Quantcast
Channel: Answers for "How to declare and access other scripts publicly in Csharpe?"
Browsing latest articles
Browse All 6 View Live

Answer by dorpeleg

Make sure your "RandomScript" is a public class. public class RandomScript : MonoBehaviour { Make sure you add the script as a component to the cube. Make sure your reference to the cube is correct. If...

View Article


Answer by melonman

I finally found the answer to this. So to declare an instance of the script you want to access seems to be as follows //declare the actual script and then the name you want to //reference it as -...

View Article


Answer by Gorgo

@melonman All of the above should be valid. Also make sure you are including the namespace to the script title, if there is one. namespace UnityStandardAssets.Characters.FirstPersonController { public...

View Article
Browsing latest articles
Browse All 6 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>