|
Post by wohltaeter on Jul 22, 2017 13:34:45 GMT
Hi,
I am trying to use FireCustomEvent via script. In the past it worked I updated to the newest version.
API says: Assets/Scripts/Shot_Spawn_Einzel.cs(216,63): error CS1503: Argument `#2' cannot convert `UnityEngine.Vector3' expression to type `UnityEngine.Transform' LevelSettings.FireCustomEvent ("Laser 1", gameObject.transform, false); Can you please give me the right line of code? I want to fire the Laser1 just from the Gameobjct (Spaceship) where the script is attachted to. That should be gameObject. And it wants a Transform... here is the transform .transform... The API said it wants a transform. I am using Mono and Unity 2017.1
Best regards,
|
|
|
Post by wohltaeter on Jul 22, 2017 14:41:22 GMT
Hi, I am trying to use FireCustomEvent via script. In the past it worked I updated to the newest version. API says: Assets/Scripts/Shot_Spawn_Einzel.cs(216,63): error CS1503: Argument `#2' cannot convert `UnityEngine.Vector3' expression to type `UnityEngine.Transform' LevelSettings.FireCustomEvent ("Laser 1", gameObject.transform, false); Can you please give me the right line of code? I want to fire the Laser1 just from the Gameobjct (Spaceship) where the script is attachted to. That should be gameObject. And it wants a Transform... here is the transform .transform... The API said it wants a transform. I am using Mono and Unity 2017.1 Best regards, I fixed it
|
|
|
Post by DarkTonic Dev on Jul 22, 2017 18:41:58 GMT
Yes, used to be Vector3, now Transform (which contains a Vector in position field). Needed for the new modes of Custom Event Receivers.
|
|