Hi all,
I am wondering if, as it happens in other programming languages, there’s a way in unityscript to create a reference to an object, or a “pointer” to it.
For example, given the code:
localtransform = GameObject.Find(“target”).transform
I would like to be able to address
“Gameobject.Find(“target”).transform” without the need to perform the “Find” again, using a ‘simple’
*localtransform.x += 1f;
(or any other equivalent pointer dereference token character, of course)
This way, I’d be able to manipulate “GameObject.Find(“target”).transform” without performing the Find operation again, and thus saving cpu cycles.
thanks