Guest User

Untitled

a guest
Oct 22nd, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. using System.Collections.Generic;
  2. using UnityEngine;
  3. using UnityEditor;
  4.  
  5. namespace NodeEditorWindow
  6. {
  7.  
  8. [CreateAssetMenu]
  9. public class LevelFlowData : BaseNodeEditorData<BaseLevelNode, LevelFlowEditorAttributes>
  10. {
  11. private const string MENU_ITEM_PATH = "Create / ScriptableObjects / LevelFlowData";
  12. private const string NEW_ASSET_PATH = "ScriptableObjects / Level Flow Data";
  13.  
  14. [SerializeField] private string _name;
  15.  
  16. /// <summary>Gets and Sets name property.</summary>
  17. public string name
  18. {
  19. get { return _name; }
  20. set { _name = value; }
  21. }
  22.  
  23. [MenuItem(MENU_ITEM_PATH)]
  24. public static void CreateAsset()
  25. {
  26. LevelFlowData scriptableObject = ScriptableObject.CreateInstance<LevelFlowData>() as LevelFlowData;
  27. AssetDatabase.CreateAsset(scriptableObject, AssetDatabase.GenerateUniqueAssetPath(NEW_ASSET_PATH));
  28. }
  29. }
  30.  
  31. }
  32.  
  33. using System.Collections;
  34. using System.Collections.Generic;
  35. using UnityEngine;
  36. using UnityEngine.UI;
  37. using GameData;
  38. using NodeEditorWindow; //HERE I AM USINGTHE OTHER CLASS'S NAMESPACE
  39.  
  40. public class LevelController : Singleton<LevelController>
  41. {
  42. [Header("Level Data:")]
  43. [SerializeField] private LevelFlowData levelFlowData;
  44. }
Add Comment
Please, Sign In to add comment