19 [ValueDropdown(
"GetStepNames")]
public List<string>
nextSteps;
38 private IEnumerable GetStepNames()
40 var list =
new ValueDropdownList<string>();
50 private IEnumerable GetVoiceoverNames()
52 var list =
new ValueDropdownList<string>();
55 if (owner.owner.VoiceOverData !=
null)
57 for (
int i = 0; i < owner.owner.VoiceOverData.voiceOverInfos.Count; i++)
59 list.Add(owner.owner.VoiceOverData.voiceOverInfos[i].id);
66 private void OnValidate()
71 public void Validate()
73 var stepDataPath = Path.GetDirectoryName(Path.GetDirectoryName(AssetDatabase.GetAssetPath(
this)));
76 string[] guids = AssetDatabase.FindAssets(
"t:StepsDataSO",
new[] {stepDataPath});
78 foreach (
string guid
in guids)
80 owner = AssetDatabase.LoadAssetAtPath<StepsDataSO>(AssetDatabase.GUIDToAssetPath(guid));
89 public bool ValidateID(
string currentStepID)
91 var stepDataPath = Path.GetDirectoryName(Path.GetDirectoryName(AssetDatabase.GetAssetPath(
this)));
94 string[] guids = AssetDatabase.FindAssets(
"t:StepsDataSO",
new[] {stepDataPath});
96 foreach (
string guid
in guids)
98 return !AssetDatabase.LoadAssetAtPath<StepsDataSO>(AssetDatabase.GUIDToAssetPath(guid))
99 .listOfSteps.Any(s =>
stepID.Equals(currentStepID));