void OnEnable() { PlannerAssetDatabase.Refresh(); PlannerCustomTypeCache.Refresh(); InitializeReorderableLists(); }
bool CheckActionCustomReward(ScriptableObject scriptableObject, IEnumerable <CustomRewardData> customRewards, Type[] customTypes) { bool isValid = true; foreach (var reward in customRewards) { var rewardType = customTypes?.FirstOrDefault(t => t.FullName == reward.Typename); if (rewardType == null) { errorLogged?.Invoke($"Couldn't resolve custom reward type {reward.Typename}.", scriptableObject); isValid = false; continue; } if (!PlannerCustomTypeCache.IsActionRewardType(rewardType)) { errorLogged?.Invoke($"Custom reward type {reward.Typename} is not implementing a custom action reward type.", scriptableObject); isValid = false; } } return(isValid); }