public void Add(PrefabAttribute attribute) { List <PrefabAttribute> prefabAttributes = this.Find(attribute.GetIndexedType()); Assert.IsTrue(!prefabAttributes.Contains(attribute), "AttributeCollection.Add: Adding twice to list"); prefabAttributes.Add(attribute); this.cache = null; }
protected string GetPath(Type type) { string path = PrefabAttribute.GetPrefabPath(type); if (string.IsNullOrEmpty(path)) { throw new UnityException("Type of " + type.Name + " can't be pooled! No path attribute found! Try specify it's path by attribute!"); } return(path); }
internal static bool ComparePrefabAttribute(PrefabAttribute x, PrefabAttribute y) { bool flag1 = (object)x == null; bool flag2 = (object)y == null; if (flag1 & flag2) { return(true); } if (flag1 | flag2) { return(false); } return(x.instanceID == y.instanceID); }
internal static bool ComparePrefabAttribute(PrefabAttribute x, PrefabAttribute y) { bool flag = x == null; bool flag1 = y == null; if (flag & flag1) { return(true); } if (flag | flag1) { return(false); } return(x.instanceID == y.instanceID); }
public virtual bool Equals(object o) { return(PrefabAttribute.ComparePrefabAttribute(this, (PrefabAttribute)o)); }
public override bool Equals(object o) { return(PrefabAttribute.ComparePrefabAttribute(this, (PrefabAttribute)o)); }