Advertisement
Guest User

Untitled

a guest
Feb 11th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.32 KB | None | 0 0
  1. //scripta.cs
  2.  
  3. [System.Serializable]   //I want this variable to be seen in the editor. Current value set to 20.
  4. public class MyClass
  5. {
  6.     public float myVar;
  7. }
  8.  
  9.  
  10. //scriptb.cs
  11.  
  12. public class BulletControl : MonoBehaviour {
  13.  
  14.     public MyClass instance;
  15.  
  16.     void Start () {
  17.         Debug.Log (instance.myVar); //Logs 0.
  18.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement