Quantcast
Channel: Questions in topic: "stackoverflowexception"
Viewing all articles
Browse latest Browse all 18

StackOverflowException due to transform.position

$
0
0
The error: StackOverflowException UnityEngine.Transform.get_position () (at C:/BuildAgent/work/14194e8ce88cdf47/Runtime/ExportGenerated/Editor/UnityEngineTransform.cs:19) Tilemap.getG (.TileUnit baseTile, .TileUnit tile) (at Assets/Scripts/Tilemap.cs:331) The function: float getG(TileUnit baseTile, TileUnit tile) { float valX, valY; float baseX,baseY,objX,objY; GameObject objBase = baseTile.getGameObject(); GameObject obj = tile.getGameObject(); baseX = objBase.transform.position.x; baseY = objBase.transform.position.y; objX = obj.transform.position.x; objY = obj.transform.position.y; valX = Mathf.Ceil(Mathf.Abs(baseX - objX)); valY = Mathf.Ceil(Mathf.Abs(baseY - objY)); return Mathf.Sqrt(Mathf.Abs(valX) + Mathf.Abs(valX)); } Any suggestions or idea as to why this is happening?

Viewing all articles
Browse latest Browse all 18

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>