public override void Read(AssetStream stream) { base.Read(stream); if (IsReadScript(stream.Flags)) { m_defaultReferences = new Dictionary <string, PPtr <Object> >(); Script = stream.ReadStringAligned(); m_defaultReferences.Read(stream); Icon.Read(stream); } if (IsReadExecutionOrder(stream.Version)) { ExecutionOrder = stream.ReadInt32(); if (IsUInt32Hash(stream.Version)) { PropertiesHash = stream.ReadUInt32(); } else { PropertiesHash128.Read(stream); } } if (IsReadPathName(stream.Version)) { PathName = stream.ReadStringAligned(); } ClassName = stream.ReadStringAligned(); if (IsReadNamespace(stream.Version)) { Namespace = stream.ReadStringAligned(); } AssemblyNameOrigin = stream.ReadStringAligned(); AssemblyName = FilenameUtils.FixAssemblyName(AssemblyNameOrigin); if (IsReadIsEditorScript(stream.Version)) { IsEditorScript = stream.ReadBoolean(); } }
public override void Read(EndianStream stream) { base.Read(stream); if (IsReadScript) { Script = stream.ReadStringAligned(); m_defaultReferences.Read(stream, () => new PPtr <Object>(AssetsFile)); Icon.Read(stream); } ExecutionOrder = stream.ReadInt32(); if (IsUIntHash) { PropertiesHash = stream.ReadUInt32(); } else { PropertiesHash128.Read(stream); } ClassName = stream.ReadStringAligned(); Namespace = stream.ReadStringAligned(); AssemblyName = stream.ReadStringAligned(); IsEditorScript = stream.ReadBoolean(); }