コード例 #1
0
ファイル: UAssetFile.cs プロジェクト: sycomix/UASSET-Toolkit
 void ReadGameObjectReferences()
 {
     //Starts directly after the name table. Assume we're already there
     gameObjectReferences = new GameObjectTableHead[refGameObjectCount];
     for(int i = 0; i<refGameObjectCount; i++)
     {
         GameObjectTableHead h = GameObjectTableHead.ReadEntry(stream, this);
         gameObjectReferences[i] = h;
         DebugDump($"Game Object Reference {i} @ {h.startPos}", ConsoleColor.Blue, "cType", h.coreType, "u1", h.unknown1.ToString(), "oType", h.objectType, "u2", h.unknown2.ToString(), "i", h.index.ToString(), "name", h.name, "u4", h.unknown4.ToString());
     }
 }
コード例 #2
0
ファイル: UAssetFile.cs プロジェクト: sycomix/UASSET-Toolkit
 public string GetReferencedUAssetPathname(int index)
 {
     if (index < 0)
     {
         GameObjectTableHead hr = gameObjectReferences[-index - 1];
         return GetReferencedUAssetPathname(hr);
     }
     else
     {
         GameObjectTableHead hr = gameObjectReferences[index];
         return GetReferencedUAssetPathname(hr);
     }
 }
コード例 #3
0
        public static GameObjectTableHead ReadEntry(IOMemoryStream ms, UAssetFile f)
        {
            //Read in
            GameObjectTableHead g = new GameObjectTableHead();

            g.startPos   = ms.position;
            g.coreType   = ms.ReadNameTableEntry(f);
            g.unknown1   = ms.ReadInt();
            g.objectType = ms.ReadNameTableEntry(f);
            g.unknown2   = ms.ReadInt();
            g.index      = ms.ReadInt();
            g.name       = ms.ReadNameTableEntry(f);
            g.unknown4   = ms.ReadInt();
            return(g);
        }
コード例 #4
0
ファイル: UAssetFile.cs プロジェクト: sycomix/UASSET-Toolkit
        public string GetReferencedUAssetPathname(GameObjectTableHead h)
        {
            //Check if we're actually looking for something else
            if (h.index < 0)
            {
                GameObjectTableHead hr = gameObjectReferences[-h.index - 1];
                return GetReferencedUAssetPathname(hr);
            }

            //Get the full path
            bool ok = TryGetFullPackagePath(h.name, out string pathname);

            //Stop if not ok
            if (!ok)
                return null;

            return pathname;
        }