Advertisement
Guest User

Untitled

a guest
Jun 11th, 2017
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using UnityEngine;
  2.  
  3. public class TestScript2 : MonoBehaviour {
  4.     void Start(){
  5.         for (int i = 0; i < MyWarbandInfo.myHeroes.Length; i++) {
  6.             Debug.Log (i);
  7.             GameObject go = new GameObject ();
  8.             go.AddComponent <CharacterStats>();
  9.             MyWarbandInfo.myHeroes [i] = go.GetComponent<CharacterStats>();
  10.             if (MyWarbandInfo.myHeroes [i] != null) {
  11.                 Debug.Log ("1234");
  12.             }
  13.         }
  14.     }
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement