Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //scripta.cs
- [System.Serializable] //I want this variable to be seen in the editor. Current value set to 20.
- public class MyClass
- {
- public float myVar;
- }
- //scriptb.cs
- public class BulletControl : MonoBehaviour {
- public MyClass instance;
- void Start () {
- Debug.Log (instance.myVar); //Logs 0.
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement