Advertisement
Guest User

Untitled

a guest
Jan 23rd, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.52 KB | None | 0 0
  1. public class Manager : MonoBehaviour
  2. {
  3.     public List<TestSO> m_sos = new List<TestSO>();
  4.  
  5.     // Start is called before the first frame update
  6.     void Start()
  7.     {
  8.        
  9.     }
  10.  
  11.     // Update is called once per frame
  12.     void Update()
  13.     {
  14.         if (Input.GetKey(KeyCode.Space))
  15.         {
  16.             var obj = (TestSO)ScriptableObject.CreateInstance("TestSO");
  17.             m_sos.Add(obj);
  18.         }
  19.     }
  20. }
  21. public class TestSO : ScriptableObject
  22. {
  23.  
  24.     public float[] a1 = new float[1024];
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement