|
Hello everyone, It seems to be a simple but I can't know whats wrong. I have an empty game object with tag modelHolder. I attached the script "InstantiatePrefab" to it. function Start () { prefab = Instantiate (myHouse, gameObject.transform.position , Quaternion.identity); prefab.transform.parent = transform; var script : ChangeCursor = prefab.AddComponent(ChangeCursor); } function CreateNext() { Destroy(prefab); } And here's the code for "ChangeCursor" function OnMouseUp() { I want simply to call the function CreateNext in the script "InstantiatePrefab", when the drag is over and the mouse is up. any solution?
(comments are locked)
|

Would it be possible to reformat your code so that it is readable. You can edit your post and make the code formatted correctly.