- Home /
Reference Components with Iron Python
I'm trying to make Iron Python able to change Unity's state so I can code during runtime.
I've been able to get most of the basics working so far, but I've been having problems with components.
If I try to set a component to a variable
line = object.GetComponent<unity.LineRenderer>()
It sees it as a bool and I can't modify it.
If I try to modify it in the middle of a line
object.GetComponent<unity.LineRenderer>().SetPosition(0, unity.Vector3.zero)
It gives the error "MissingMemberException: 'tuple' object has no attribute 'SetPosition'"
How can I go about fixing this?
Edit: Scripts all have the following header to access unity elements:
import UnityEngine as unity
Your answer
Follow this Question
Related Questions
2D Animation does not start 1 Answer
Enabling multiple Monobehaviour Components in a game object 1 Answer
enable and disable script on Unity gameobject 0 Answers
Cannot destroy Component while GameObject is being activated or deactivated 2 Answers
I can't add a very simple Bolt flow to a gameobject 1 Answer