Ejemplo n.º 1
0
            public void Initialize(RootPathControl owner, PackedMemorySnapshot snapshot, PackedNativeUnityEngineObject nativeObject)
            {
                m_Owner        = owner;
                m_Snapshot     = snapshot;
                m_NativeObject = new RichNativeObject(snapshot, nativeObject.nativeObjectsArrayIndex);

                m_Value     = m_NativeObject.name;
                m_Address   = m_NativeObject.address;
                displayName = m_NativeObject.type.name;

                // If it's a MonoBehaviour or ScriptableObject, use the C# typename instead
                // It makes it easier to understand what it is, otherwise everything displays 'MonoBehaviour' only.
                // TODO: Move to separate method
                if (m_NativeObject.type.IsSubclassOf(m_Snapshot.coreTypes.nativeMonoBehaviour) || m_NativeObject.type.IsSubclassOf(m_Snapshot.coreTypes.nativeScriptableObject))
                {
                    string monoScriptName;
                    if (m_Snapshot.FindNativeMonoScriptType(m_NativeObject.packed.nativeObjectsArrayIndex, out monoScriptName) != -1)
                    {
                        if (!string.IsNullOrEmpty(monoScriptName))
                        {
                            displayName = monoScriptName;
                        }
                    }
                }
            }
Ejemplo n.º 2
0
        protected override void OnCreate()
        {
            base.OnCreate();

            m_RootPathControl = new RootPathControl(window, GetPrefsKey(() => m_RootPathControl), new TreeViewState());
            m_RootPathControl.onSelectionChange += OnSelectionChange;
        }
Ejemplo n.º 3
0
            public void Initialize(RootPathControl owner, PackedMemorySnapshot snapshot, int arrayIndex)
            {
                m_Owner         = owner;
                m_ManagedObject = new RichManagedObject(snapshot, arrayIndex);

                displayName = m_ManagedObject.type.name;
                m_Address   = m_ManagedObject.address;
                m_Value     = m_ManagedObject.nativeObject.isValid ? m_ManagedObject.nativeObject.name : "";
            }
Ejemplo n.º 4
0
            public void Initialize(RootPathControl owner, PackedMemorySnapshot snapshot, int gcHandleArrayIndex)
            {
                m_Owner    = owner;
                m_Snapshot = snapshot;
                m_GCHandle = new RichGCHandle(m_Snapshot, gcHandleArrayIndex);

                displayName = "GCHandle";
                m_Value     = m_GCHandle.managedObject.isValid ? m_GCHandle.managedObject.type.name : "";
                m_Address   = m_GCHandle.managedObjectAddress;
            }
Ejemplo n.º 5
0
            public void Initialize(RootPathControl owner, PackedMemorySnapshot snapshot, int arrayIndex)
            {
                m_Owner       = owner;
                m_Snapshot    = snapshot;
                m_StaticField = m_Snapshot.managedStaticFields[arrayIndex];

                var staticClassType = m_Snapshot.managedTypes[m_StaticField.managedTypesArrayIndex];
                var staticField     = staticClassType.fields[m_StaticField.fieldIndex];

                m_Address   = 0;
                displayName = staticClassType.name;
                m_Value     = "static " + staticField.name;
            }