public void LoadBehavior(BehaviorSaveData behaviorSaveData) { //Debug.Log("QuestLog.LoadQuest(" + questSaveData.MyName + ")"); BehaviorProfile behaviorProfile = GetResource(behaviorSaveData.MyName); if (behaviorProfile != null) { behaviorProfile.Completed = behaviorSaveData.completed; } }
public BehaviorProfile GetNewResource(string resourceName) { //Debug.Log(this.GetType().Name + ".GetResource(" + resourceName + ")"); if (!RequestIsEmpty(resourceName)) { string keyName = prepareStringForMatch(resourceName); if (resourceList.ContainsKey(keyName)) { BehaviorProfile returnValue = ScriptableObject.Instantiate(resourceList[keyName]) as BehaviorProfile; returnValue.SetupScriptableObjects(); return(returnValue); } } return(null); }