private bool ValidateScript(ScriptItem scriptItem) { var scriptName = scriptItem.ScriptName; var scriptType = ScriptsBuilder.FindScript(scriptName); return(scriptType != null); }
private void AddScripts(List <ScriptItem> items) { var list = new List <ScriptType>(items.Count); for (int i = 0; i < items.Count; i++) { var item = items[i]; var scriptName = item.ScriptName; var scriptType = ScriptsBuilder.FindScript(scriptName); if (scriptType == null) { Editor.LogWarning("Invalid script type " + scriptName); } else { list.Add(new ScriptType(scriptType)); } } AddScripts(list); }