Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- public class TestScript2 : MonoBehaviour {
- void Start(){
- for (int i = 0; i < MyWarbandInfo.myHeroes.Length; i++) {
- Debug.Log (i);
- GameObject go = new GameObject ();
- go.AddComponent <CharacterStats>();
- MyWarbandInfo.myHeroes [i] = go.GetComponent<CharacterStats>();
- if (MyWarbandInfo.myHeroes [i] != null) {
- Debug.Log ("1234");
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement