|
I am getting from what I can see a very bazar error telling me that AddToInventory has no receiver. Sending the information script: AddToInventory function (belongs to the item):
(comments are locked)
|
|
thing2 is the name of the prefab, not the name of the Instantiated instance of the prefab. Change the 2 lines in the original code to: var aThing = Instantiate(thing2, transform.position, Quaternion.identity); aThing.SendMessage ("AddToInventory"); Thanks a lot!
Feb 21 '12 at 10:09 AM
MithosAnnar
(comments are locked)
|
|
I think you want to change your instantiate and sendMessage lines to look something like this: thing2 is a reference to the object to be instantiated, not the newly instantiated object... you need to store the new object in a variable (newThing in my example) This is correct to +1!
Feb 21 '12 at 10:10 AM
MithosAnnar
(comments are locked)
|

http://dictionary.reference.com/browse/bizarre
bizarre*