I am trying to make a game where a rolling ball picks up items with rigidbodies as a proof of concept, however I keep getting the error message: “‘transform’ is not a member of ‘object’”. I use boo for scripting so that might be the problem. The code:
import UnityEngine
class ParentOnCollide (MonoBehaviour):
def Start ():
pass
def Update ():
pass
def OnCollisonEnter(NewCollide):
NewCollide.transform.parent = gameObject.transform.parent
def OnCollisonExit(NewCollide):
NewCollide.transform.parent = gameObject.transform.parent.transform.parent