예제 #1
0
 public FWorldTileInfo(int[] position, int[] absolutePosition, BoxPropertyData bounds, FWorldTileLayer layer, bool bHideInTileView, FString parentTilePackageName, FWorldTileLODInfo[] lODList, int zOrder)
 {
     Position              = position;
     AbsolutePosition      = absolutePosition;
     Bounds                = bounds;
     Layer                 = layer;
     this.bHideInTileView  = bHideInTileView;
     ParentTilePackageName = parentTilePackageName;
     LODList               = lODList;
     ZOrder                = zOrder;
 }
예제 #2
0
        public void Read(AssetBinaryReader reader, UAsset asset)
        {
            Position         = new int[3];
            AbsolutePosition = new int[3];

            if (asset.GetCustomVersion <FFortniteMainBranchObjectVersion>() < FFortniteMainBranchObjectVersion.WorldCompositionTile3DOffset)
            {
                Position[0] = reader.ReadInt32();
                Position[1] = reader.ReadInt32();
                Position[2] = 0;
            }
            else
            {
                Position[0] = reader.ReadInt32();
                Position[1] = reader.ReadInt32();
                Position[2] = reader.ReadInt32();
            }
            Bounds = new BoxPropertyData(new FName());
            Bounds.Read(reader, false, 0, 0);
            Layer = new FWorldTileLayer();
            Layer.Read(reader, asset);

            if (asset.EngineVersion >= UE4Version.VER_UE4_WORLD_LEVEL_INFO_UPDATED)
            {
                bHideInTileView       = reader.ReadInt32() == 1;
                ParentTilePackageName = reader.ReadFString();
            }

            if (asset.EngineVersion >= UE4Version.VER_UE4_WORLD_LEVEL_INFO_LOD_LIST)
            {
                int numEntries = reader.ReadInt32();
                LODList = new FWorldTileLODInfo[numEntries];
                for (int i = 0; i < numEntries; i++)
                {
                    LODList[i] = new FWorldTileLODInfo();
                    LODList[i].Read(reader, asset);
                }
            }

            if (asset.EngineVersion >= UE4Version.VER_UE4_WORLD_LEVEL_INFO_ZORDER)
            {
                ZOrder = reader.ReadInt32();
            }

#pragma warning disable CS0162 // Unreachable code detected
            if (false)         // Ar.GetPortFlags() & PPF_DuplicateForPIE
            {
                AbsolutePosition[0] = reader.ReadInt32();
                AbsolutePosition[1] = reader.ReadInt32();
                AbsolutePosition[2] = reader.ReadInt32();
            }
#pragma warning restore CS0162 // Unreachable code detected
        }