void OnGUI() { var dmap = EData.GetDMap(); m_scrollPos = EditorGUILayout.BeginScrollView(m_scrollPos); foreach (var pr in dmap) { EditorGUILayout.LabelField(pr.Key + " ==> " + pr.Value); } EditorGUILayout.EndScrollView(); }
public static EDOInt DFGet(string id, int defVal) { bool isNew = true; var edo = EData.FGet <EDOInt>(id, out isNew); if (isNew) { edo.val = defVal; } return(edo); }
public static EDOBool DFGet(string id, bool defVal) { bool isNew = true; EDOBool edo = EData.FGet <EDOBool>(id, out isNew); if (isNew) { edo.val = defVal; } return(edo); }
private static void _EnsureInstance() { if (ms_instance == null) { if (EUtil.AssetExists(PATH)) { //Dbg.Log("EData.sctor: exist"); ms_instance = AssetDatabase.LoadAssetAtPath(PATH, typeof(EData)) as EData; Dbg.Assert(ms_instance != null, "EData.sctor: failed to load asset from path : {0}", PATH); } else { //Dbg.Log("EData.sctor: non-exist"); ms_instance = ScriptableObject.CreateInstance <EData>(); Dbg.Assert(ms_instance != null, "EData.sctor: failed to create asset"); AssetDatabase.CreateAsset(ms_instance, PATH); AssetDatabase.SaveAssets(); } } }