public StreamedClip(ObjectReader reader) { data = reader.ReadUInt32Array(); curveCount = reader.ReadUInt32(); }
public BlendDirectDataConstant(ObjectReader reader) { m_ChildBlendEventIDArray = reader.ReadUInt32Array(reader.ReadInt32()); m_NormalizedBlendValues = reader.ReadBoolean(); reader.AlignStream(4); }
public LeafInfoConstant(ObjectReader reader) { m_IDArray = reader.ReadUInt32Array(reader.ReadInt32()); m_IndexOffset = reader.ReadUInt32(); }
public MotionNeighborList(ObjectReader reader) { m_NeighborArray = reader.ReadUInt32Array(reader.ReadInt32()); }
protected Renderer(ObjectReader reader) : base(reader) { if (version[0] < 5) { var m_Enabled = reader.ReadBoolean(); var m_CastShadows = reader.ReadByte(); var m_ReceiveShadows = reader.ReadBoolean(); var m_LightmapIndex = reader.ReadByte(); } else { var m_Enabled = reader.ReadBoolean(); reader.AlignStream(4); var m_CastShadows = reader.ReadByte(); var m_ReceiveShadows = reader.ReadBoolean(); reader.AlignStream(4); if (version[0] >= 2018)//2018 and up { var m_RenderingLayerMask = reader.ReadUInt32(); } var m_LightmapIndex = reader.ReadUInt16(); var m_LightmapIndexDynamic = reader.ReadUInt16(); } if (version[0] >= 3) { reader.Position += 16;//Vector4f m_LightmapTilingOffset } if (version[0] >= 5) { reader.Position += 16;//Vector4f m_LightmapTilingOffsetDynamic } m_Materials = new PPtr <Material> [reader.ReadInt32()]; for (int m = 0; m < m_Materials.Length; m++) { m_Materials[m] = new PPtr <Material>(reader); } if (version[0] < 3) { reader.Position += 16;//m_LightmapTilingOffset vector4d } else { if ((version[0] == 5 && version[1] >= 5) || version[0] > 5)//5.5.0 and up { m_StaticBatchInfo = new StaticBatchInfo { firstSubMesh = reader.ReadUInt16(), subMeshCount = reader.ReadUInt16() }; } else { int numSubsetIndices = reader.ReadInt32(); m_SubsetIndices = reader.ReadUInt32Array(numSubsetIndices); } var m_StaticBatchRoot = new PPtr <Transform>(reader); if ((version[0] == 5 && version[1] >= 4) || version[0] > 5)//5.4.0 and up { var m_ProbeAnchor = new PPtr <Transform>(reader); var m_LightProbeVolumeOverride = new PPtr <GameObject>(reader); } else if (version[0] >= 4 || (version[0] == 3 && version[1] >= 5))//3.5 - 5.3 { var m_UseLightProbes = reader.ReadBoolean(); reader.AlignStream(4); if (version[0] == 5)//5.0 and up { int m_ReflectionProbeUsage = reader.ReadInt32(); } var m_LightProbeAnchor = new PPtr <Transform>(reader); } if (version[0] >= 5 || (version[0] == 4 && version[1] >= 3)) //4.3 and up { if (version[0] == 4 && version[1] == 3) //4.3 { int m_SortingLayer = reader.ReadInt16(); } else { int m_SortingLayerID = reader.ReadInt32(); //SInt16 m_SortingOrder 5.6 and up } int m_SortingOrder = reader.ReadInt16(); reader.AlignStream(4); } } }