// initialization of troubled asset void Populate() { Object[] selection = Selection.GetFiltered(typeof(TestScriptable), SelectionMode.Assets); if (selection.Length > 0) { if (selection[0] == null) { return; } testScriptable = (TestScriptable)selection[0]; } }
// initialization of troubled asset void Populate() { Object[] selection = Selection.GetFiltered(typeof(TestScriptable), SelectionMode.Assets); if (selection.Length > 0) { if (selection[0] == null) { return; } testScriptable = (TestScriptable)selection[0]; // initialization of the serializedObj, that we are working on serializedObj = new SerializedObject(testScriptable); } }
private void Start() { TestScriptable data = Resources.Load <TestScriptable>("GameData"); Debug.Log(" GameData ====> : " + data.val); }