protected Transform(AssetsFile assetsFile, int classID) : base(assetsFile, classID) { }
public SpriteObject(AssetsFile assetsFile) : base(assetsFile, AssetsConstants.ClassID.SpriteClassID) { }
public Transform(AssetsFile assetsFile) : base(assetsFile, AssetsConstants.ClassID.TransformClassID) { }
public MonoBehaviourObject(AssetsFile assetsFile, MonoScriptObject scriptObject) : base(assetsFile, scriptObject.PropertiesHash) { Enabled = 1; MonoscriptTypePtr = new SmartPtr <MonoScriptObject>(this, (IObjectInfo <MonoScriptObject>)scriptObject.ObjectInfo); }
public AssetBundle(AssetsFile assetsFile) : base(assetsFile, AssetsConstants.ClassID.MonoScriptType) { }
public int GetFileIDForFile(AssetsFile file) { return(GetFileIDForFilename(file.AssetsFilename)); }
public AudioClipObject(AssetsFile assetsFile) : base(assetsFile, AssetsConstants.ClassID.AudioClipClassID) { }
public static IObjectInfo <AssetsObject> FromTypeHash(AssetsFile assetsFile, Guid typeHash, AssetsObject assetsObject) { var typeIndex = assetsFile.Metadata.Types.IndexOf(assetsFile.Metadata.Types.First(x => x.TypeHash == typeHash)); return(FromTypeIndex(assetsFile, typeIndex, assetsObject)); }
private static Type GetObjectType(AssetsFile assetsFile, int typeIndex) { Type type = null; var objectType = assetsFile.Metadata.Types[typeIndex]; switch (objectType.ClassID) { case AssetsConstants.ClassID.MonoBehaviourScriptType: var found = assetsFile.Manager.GetScriptObject(objectType.TypeHash); if (found != null && assetsFile.Manager.ClassNameToTypes.ContainsKey(found.ClassName)) { Type assetObjectType = assetsFile.Manager.ClassNameToTypes[found.ClassName]; if (!assetObjectType.IsSubclassOf(typeof(MonoBehaviourObject))) { throw new ArgumentException("Types provided in scriptHashToTypes must be a subclass of AssetsMonoBehaviourObject."); } type = assetObjectType; } else { type = typeof(MonoBehaviourObject); } break; case AssetsConstants.ClassID.AudioClipClassID: type = typeof(AudioClipObject); break; case AssetsConstants.ClassID.Texture2DClassID: type = typeof(Texture2DObject); break; case AssetsConstants.ClassID.GameObjectClassID: type = typeof(GameObject); break; case AssetsConstants.ClassID.TextAssetClassID: type = typeof(TextAsset); break; case AssetsConstants.ClassID.SpriteClassID: type = typeof(SpriteObject); break; case AssetsConstants.ClassID.MonoScriptType: type = typeof(MonoScriptObject); break; case AssetsConstants.ClassID.MeshAssetClassID: type = typeof(MeshObject); break; case AssetsConstants.ClassID.MeshFilterClassID: type = typeof(MeshFilterObject); break; case AssetsConstants.ClassID.TransformClassID: type = typeof(Transform); break; case AssetsConstants.ClassID.RectTransformClassID: type = typeof(RectTransform); break; default: type = typeof(AssetsObject); break; } return(type); }
private ObjectInfo(Int64 objectID, Int32 dataOffset, Int32 dataSize, Int32 typeIndex, AssetsFile parentFile, T assetsObject) { ObjectID = ObjectID; DataOffset = dataOffset; DataSize = dataSize; TypeIndex = typeIndex; ParentFile = parentFile; _object = assetsObject; }
public static IObjectInfo <AssetsObject> FromClassID(AssetsFile assetsFile, int classID, AssetsObject assetsObject) { var typeIndex = assetsFile.Metadata.Types.IndexOf(assetsFile.Metadata.Types.First(x => x.ClassID == classID)); return(FromTypeIndex(assetsFile, typeIndex, assetsObject)); }
protected Component(AssetsFile assetsFile, int classID) : base(assetsFile, classID) { }
protected Component(AssetsFile assetsFile, Guid typeHash) { ObjectInfo = ObjectInfo <AssetsObject> .FromTypeHash(assetsFile, typeHash, this); }
public TextAsset(AssetsFile assetsFile) : base(assetsFile, AssetsConstants.ClassID.TextAssetClassID) { }
public GameObject(AssetsFile assetsFile) : base(assetsFile, AssetsConstants.ClassID.GameObjectClassID) { IsActive = true; }
public MeshFilterObject(AssetsFile assetsFile) : base(assetsFile, AssetsConstants.ClassID.MeshFilterClassID) { }
public MonoScriptObject(AssetsFile assetsFile) : base(assetsFile, AssetsConstants.ClassID.MonoScriptType) { }
public PropertySheet(AssetsFile file, AssetsObject owner, AssetsReader reader) { Parse(file, owner, reader); }