Advertisement
Guest User

PlaceObjectData

a guest
Mar 14th, 2015
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.82 KB | None | 0 0
  1. using UnityEngine;
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5.  
  6. [Serializable]
  7. public class PlaceObjectData : ScriptableObject
  8. {
  9.     [SerializeField]
  10.     public bool m_placementMode;
  11.     [SerializeField]
  12.     public int m_selectedIndex;
  13.     [SerializeField]
  14.     public SerializableDictionary<string, SerializableNestedList<GameObject>> m_objects;
  15.  
  16.     public void OnEnable()
  17.     {
  18.         hideFlags = HideFlags.HideAndDontSave;
  19.         Debug.Log("PlaceObjectData.OnEnable()");
  20.  
  21.         if (m_objects == null)
  22.         {
  23.             m_objects = ScriptableObject.CreateInstance<SerializableDictionary<string, SerializableNestedList<GameObject>>>();
  24.             Debug.Log("Creating Objects List.");
  25.         }
  26.  
  27.         m_selectedIndex = 0;
  28.         m_placementMode = false;
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement