Ejemplo n.º 1
0
 public PackedNativeUnityEngineObject(string name, int instanceId, int size, int nativeTypeArrayIndex, UnityEngine.HideFlags hideFlags, ObjectFlags flags, long nativeObjectAddress)
 {
     m_Name                 = name;
     m_InstanceId           = instanceId;
     m_Size                 = size;
     m_NativeTypeArrayIndex = nativeTypeArrayIndex;
     m_HideFlags            = hideFlags;
     m_Flags                = flags;
     m_NativeObjectAddress  = nativeObjectAddress;
 }
Ejemplo n.º 2
0
 static void Object_hideFlags(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.Object _this = (UnityEngine.Object)vc.csObj;
         var result = _this.hideFlags;
         JSApi.setEnum((int)JSApi.SetType.Rval, (int)result);
     }
     else
     {
         UnityEngine.HideFlags arg0  = (UnityEngine.HideFlags)JSApi.getEnum((int)JSApi.GetType.Arg);
         UnityEngine.Object    _this = (UnityEngine.Object)vc.csObj;
         _this.hideFlags = arg0;
     }
 }
Ejemplo n.º 3
0
 public static int set_hideFlags_wrap(long L)
 {
     try
     {
         long                  nThisPtr = FCLibHelper.fc_get_inport_obj_ptr(L);
         UnityObject           ret      = get_obj(nThisPtr);
         UnityEngine.HideFlags arg0     = (UnityEngine.HideFlags)(FCLibHelper.fc_get_int(L, 0));
         ret.hideFlags = arg0;
     }
     catch (Exception e)
     {
         Debug.LogException(e);
     }
     return(0);
 }
Ejemplo n.º 4
0
        public GameObject Spawn(SlowSpawn.SpawnFlags spawnFlags = 7, UnityEngine.HideFlags HideFlags = 9)
        {
            GameObject gameObject = new GameObject(string.Empty)
            {
                hideFlags = HideFlags,
                layer     = this.Layer
            };

            gameObject.transform.position = this.Position;
            gameObject.transform.rotation = this.Rotation;
            GameObject gameObject1 = gameObject;

            this.AddTo(gameObject1, spawnFlags, true);
            return(gameObject1);
        }
Ejemplo n.º 5
0
        public PackedMemorySnapshot(Profiling.Memory.Experimental.PackedMemorySnapshot snapshot)
        {
            int cacheCapacity = 128;

            string[] cacheString  = new string[cacheCapacity];
            string[] cacheString2 = new string[cacheCapacity];
            int[]    cacheInt     = new int[cacheCapacity];
            int[]    cacheInt2    = new int[cacheCapacity];
            int[]    cacheInt3    = new int[cacheCapacity];
            ulong[]  cacheULong   = new ulong[cacheCapacity];
            ulong[]  cacheULong2  = new ulong[cacheCapacity];
            byte[][] cacheBytes   = new byte[cacheCapacity][];

            m_NativeTypes = new PackedNativeType[snapshot.nativeTypes.GetNumEntries()];
            {
                for (int offset = 0; offset < m_NativeTypes.Length; offset += cacheCapacity)
                {
                    uint size = (uint)Math.Min(m_NativeTypes.Length - offset, cacheCapacity);

                    snapshot.nativeTypes.typeName.GetEntries((uint)offset, size, ref cacheString);
                    snapshot.nativeTypes.nativeBaseTypeArrayIndex.GetEntries((uint)offset, size, ref cacheInt);

                    for (uint i = 0; i < size; i++)
                    {
                        m_NativeTypes[offset + i] = new PackedNativeType(cacheString[i], cacheInt[i]);
                    }
                }
            }

            m_NativeObjects = new PackedNativeUnityEngineObject[snapshot.nativeObjects.GetNumEntries()];
            {
                UnityEditor.Profiling.Memory.Experimental.ObjectFlags[] cacheObjectFlags = new UnityEditor.Profiling.Memory.Experimental.ObjectFlags[cacheCapacity];
                UnityEngine.HideFlags[] cacheHideFlags = new UnityEngine.HideFlags[cacheCapacity];

                for (int offset = 0; offset < m_NativeObjects.Length; offset += cacheCapacity)
                {
                    uint size = (uint)Math.Min(m_NativeObjects.Length - offset, cacheCapacity);

                    snapshot.nativeObjects.objectName.GetEntries((uint)offset, size, ref cacheString);
                    snapshot.nativeObjects.instanceId.GetEntries((uint)offset, size, ref cacheInt);
                    snapshot.nativeObjects.size.GetEntries((uint)offset, size, ref cacheULong);
                    snapshot.nativeObjects.nativeTypeArrayIndex.GetEntries((uint)offset, size, ref cacheInt2);
                    snapshot.nativeObjects.hideFlags.GetEntries((uint)offset, size, ref cacheHideFlags);
                    snapshot.nativeObjects.flags.GetEntries((uint)offset, size, ref cacheObjectFlags);
                    snapshot.nativeObjects.nativeObjectAddress.GetEntries((uint)offset, size, ref cacheULong2);

                    for (uint i = 0; i < size; i++)
                    {
                        m_NativeObjects[offset + i] = new PackedNativeUnityEngineObject(
                            cacheString[i],
                            cacheInt[i],
                            (int)cacheULong[i],
                            cacheInt2[i],
                            cacheHideFlags[i],
                            (PackedNativeUnityEngineObject.ObjectFlags)cacheObjectFlags[i],
                            (long)cacheULong2[i]);
                    }
                }
            }

            m_GCHandles = new PackedGCHandle[snapshot.gcHandles.GetNumEntries()];
            {
                for (int offset = 0; offset < m_GCHandles.Length; offset += cacheCapacity)
                {
                    uint size = (uint)Math.Min(m_GCHandles.Length - offset, cacheCapacity);

                    snapshot.gcHandles.target.GetEntries((uint)offset, size, ref cacheULong);

                    for (uint i = 0; i < size; i++)
                    {
                        m_GCHandles[offset + i] = new PackedGCHandle((UInt64)cacheULong[i]);
                    }
                }
            }

            m_Connections = new Connection[snapshot.connections.GetNumEntries()];
            {
                for (int offset = 0; offset < m_Connections.Length; offset += cacheCapacity)
                {
                    uint size = (uint)Math.Min(m_Connections.Length - offset, cacheCapacity);

                    snapshot.connections.from.GetEntries((uint)offset, (uint)size, ref cacheInt);
                    snapshot.connections.to.GetEntries((uint)offset, (uint)size, ref cacheInt2);

                    for (uint i = 0; i < size; i++)
                    {
                        m_Connections[offset + i] = new Connection(cacheInt[i], cacheInt2[i]);
                    }
                }
            }

            m_ManagedHeapSections = new MemorySection[snapshot.managedHeapSections.GetNumEntries()];
            {
                for (int offset = 0; offset < m_ManagedHeapSections.Length; offset += cacheCapacity)
                {
                    uint size = (uint)Math.Min(m_ManagedHeapSections.Length - offset, cacheCapacity);

                    snapshot.managedHeapSections.startAddress.GetEntries((uint)offset, (uint)size, ref cacheULong);
                    snapshot.managedHeapSections.bytes.GetEntries((uint)offset, (uint)size, ref cacheBytes);

                    for (uint i = 0; i < size; i++)
                    {
                        m_ManagedHeapSections[offset + i] = new MemorySection(cacheBytes[i], (UInt64)cacheULong[i]);
                    }
                }
            }

            m_TypeDescriptions = new TypeDescription[snapshot.typeDescriptions.GetNumEntries()];
            {
                UnityEditor.Profiling.Memory.Experimental.TypeFlags[] cacheFlags = new UnityEditor.Profiling.Memory.Experimental.TypeFlags[cacheCapacity];
                int[][]  cacheRange       = new int[cacheCapacity][];
                string[] cacheSmallString = new string[1];
                int[]    cacheSmallInt    = new int[1];
                int[]    cacheSmallInt2   = new int[1];
                bool[]   cacheSmallBool   = new bool[1];

                for (int offset = 0; offset < m_TypeDescriptions.Length; offset += cacheCapacity)
                {
                    uint size = (uint)Math.Min(m_TypeDescriptions.Length - offset, cacheCapacity);
                    snapshot.typeDescriptions.typeDescriptionName.GetEntries((uint)offset, (uint)size, ref cacheString);
                    snapshot.typeDescriptions.assembly.GetEntries((uint)offset, (uint)size, ref cacheString2);
                    snapshot.typeDescriptions.fieldIndices.GetEntries((uint)offset, (uint)size, ref cacheRange);
                    snapshot.typeDescriptions.staticFieldBytes.GetEntries((uint)offset, (uint)size, ref cacheBytes);
                    snapshot.typeDescriptions.baseOrElementTypeIndex.GetEntries((uint)offset, (uint)size, ref cacheInt);
                    snapshot.typeDescriptions.size.GetEntries((uint)offset, (uint)size, ref cacheInt2);
                    snapshot.typeDescriptions.typeInfoAddress.GetEntries((uint)offset, (uint)size, ref cacheULong);
                    snapshot.typeDescriptions.typeIndex.GetEntries((uint)offset, (uint)size, ref cacheInt3);
                    snapshot.typeDescriptions.flags.GetEntries((uint)offset, (uint)size, ref cacheFlags);

                    for (int i = 0; i < size; ++i)
                    {
                        FieldDescription[] fieldDescription = new FieldDescription[cacheRange[i].Length];

                        for (uint j = 0; j < cacheRange[i].Length; j++)
                        {
                            snapshot.fieldDescriptions.fieldDescriptionName.GetEntries((uint)cacheRange[i][j], 1, ref cacheSmallString);
                            snapshot.fieldDescriptions.offset.GetEntries((uint)cacheRange[i][j], 1, ref cacheSmallInt);
                            snapshot.fieldDescriptions.typeIndex.GetEntries((uint)cacheRange[i][j], 1, ref cacheSmallInt2);
                            snapshot.fieldDescriptions.isStatic.GetEntries((uint)cacheRange[i][j], 1, ref cacheSmallBool);

                            fieldDescription[j] = new FieldDescription(cacheSmallString[0], cacheSmallInt[0], cacheSmallInt2[0], cacheSmallBool[0]);
                        }

                        m_TypeDescriptions[offset + i] = new TypeDescription(
                            cacheString[i],
                            cacheString2[i],
                            fieldDescription,
                            cacheBytes[i],
                            cacheInt[i],
                            cacheInt2[i],
                            (UInt64)cacheULong[i],
                            cacheInt3[i],
                            (TypeDescription.TypeFlags)cacheFlags[i]);
                    }
                }
            }

            m_VirtualMachineInformation = new VirtualMachineInformation(snapshot.virtualMachineInformation);
        }
Ejemplo n.º 6
0
 public IEnumerable <GameObject> SpawnAll(SlowSpawn.SpawnFlags SpawnFlags = 7, UnityEngine.HideFlags HideFlags = 9)
 {
     SlowSpawn.< SpawnAll > c__Iterator3A variable = null;
     return(variable);
 }