protected override void OnEnable() { // Has to be in OnEnable to happen before initialize facsStore = GetComponent <FACSStoreComponent>(); GetComponent <BehaviorParameters>().BrainParameters.VectorObservationSize = 8 + facsStore.facsstore.FacialActions.Length; GetComponent <BehaviorParameters>().BrainParameters.VectorActionSize = new int[] { facsStore.facsstore.FacialActions.Length }; base.OnEnable(); }
protected void OnEnable() { facsStore = (FACSStoreComponent)target; string path = Path.Combine(Application.persistentDataPath, facsStore.FACStoreJSONPath); if (File.Exists(path)) { JsonUtility.FromJsonOverwrite(File.ReadAllText(path), facsStore.facsstore); } else { JsonUtility.FromJsonOverwrite(File.ReadAllText(Path.Combine(Application.streamingAssetsPath, facsStore.FACStoreJSONPath)), facsStore.facsstore); } Debug.Log($"Loaded {facsStore.facsstore.FacialActions.Length} facial actions"); }