/// <summary> /// This method returns a reference to the PlaylistController whose name you specify. This is necessary when you have more than one. /// </summary> /// <param name="playlistControllerName"></param> /// <returns></returns> public static PlaylistController InstanceByName(string playlistControllerName) { var match = Instances.Find(delegate(PlaylistController obj) { return(obj != null && obj.name == playlistControllerName); }); if (match != null) { return(match); } Debug.LogError("Could not find Playlist Controller '" + playlistControllerName + "'."); return(null); }
private AbcTrait ImportTrait(AbcTrait from) { var trait = new AbcTrait { Kind = from.Kind, Name = ImportConst(from.Name), Attributes = from.Attributes, Property = from.Property }; switch (from.Kind) { case AbcTraitKind.Slot: case AbcTraitKind.Const: { trait.SlotId = from.SlotId; trait.HasValue = from.HasValue; trait.SlotType = ImportType(from.SlotType); if (from.HasValue) { trait.SlotValue = ImportValue(from.SlotValue); } } break; case AbcTraitKind.Method: case AbcTraitKind.Getter: case AbcTraitKind.Setter: { trait.SlotId = from.SlotId; trait.Method = ImportMethod(from.Method); } break; case AbcTraitKind.Class: { var instance = Instances.Find(from.Name) ?? ImportInstance(from.Class.Instance); trait.Class = instance.Class; //trait.SlotID = trait.SlotID; } break; case AbcTraitKind.Function: { trait.SlotId = from.SlotId; trait.Method = ImportMethod(from.Method); } break; } ImportEmbedAsset(trait, from); if (from.HasMetadata) { var md = from.Metadata; if (md != null) { var abc = from.Name.ABC; foreach (var e in md) { if (ProcessMetaEntry(abc, trait, e)) { continue; } var e2 = ImportMetaEntry(abc, e); if (e2 != null) { trait.HasMetadata = true; trait.Metadata.Add(e2); } } } } return(trait); }
public AbcInstance FindInstance(AbcMultiname multiname) { return(Instances.Find(multiname)); }
public AbcInstance FindInstance(string fullname) { return(Instances.Find(fullname)); }