public MonoBehaviorAssetData(BinaryReader reader, int length) { int startOffset = (int)reader.BaseStream.Position; gameObject = new AssetPtr(reader); enabled = reader.ReadInt32(); script = new AssetPtr(reader); name = reader.ReadAlignedString(); int headerLen = (int)reader.BaseStream.Position - startOffset; switch (script.pathID) { case LevelBehaviorData.PathID: data = new LevelBehaviorData(reader, length - headerLen); break; case LevelCollectionBehaviorData.PathID: data = new LevelCollectionBehaviorData(reader, length - headerLen); break; case BeatmapDataBehaviorData.PathID: data = new BeatmapDataBehaviorData(reader, length - headerLen); break; default: data = new UnknownBehaviorData(reader, length - headerLen); break; } }
public AssetObject RemoveScript(BehaviorData data) { return(RemoveAsset(ao => ao.data.GetType().Equals(typeof(MonoBehaviorAssetData)) && (ao.data as MonoBehaviorAssetData).data.Equals(data))); }
public abstract bool Equals(BehaviorData data);