Hello everybody I only have very basic programming knowledge so I thought I would ask on here for help, what script would you write so that when you press a button on screen a GameObject will change. I am planning to use this so that once I press a button on the screen the GameObject (a hammer) will switch/ be replaced by another GameObject (a sword or something like that)
Thank you for such a fast reply however Iâm having a few problems, I get two errors when I try to use the script. âUnexpected Token: Mesh.â and âUnexpected Token: GameObject.â Any idea what I could be doing wrong?
Thank you again for your help but Iâm getting a new error, âMissingFieldException: Field âUnityEngine.MeshRenderer.meshâ not found.
Boo.Lang.Runtime.DynamicDispatching.PropertyDispatcherFactory.FindExtension (IEnumerable`1 candidates)â Iâm using your JavaScript script
Haha no your help is much appreciated , I had another error with the last bit of code but added âObjectâ after âtargetâ and it now seems to be working perfectly Big thanks for all your help