Guest User

Untitled

a guest
Dec 29th, 2014
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3. [ExecuteInEditMode]
  4.  
  5. public class TestAnything : MonoBehaviour {
  6.  
  7.     public struct bobStructure
  8.     {
  9.         public float mebob;
  10.         public int[] bob;
  11.     }
  12.  
  13.     public bobStructure bobs = new bobStructure[12];
  14.  
  15.     void Start() {
  16.  
  17.         for (int i = 0; i < bobs.Length; ++i)
  18.         {
  19.             bobs[i].bob = new int[5];
  20.         }
  21.        
  22.         bobs[2].bob[3] = 12;
  23.         bobs[1].bob[3] = 6;
  24.  
  25.     }
  26.  
  27.     void Update()
  28.     {
  29.  
  30.         Debug.Log(" "+ bobs[2].bob[3]);
  31.         Debug.Log(" "+ bobs[1].bob[3]);
  32.  
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment