mirror of
https://github.com/sinai-dev/UnityExplorer.git
synced 2025-06-23 00:52:31 +08:00

* Added a fallback method for GetRootSceneObjects for games where this fails. * Fixed an issue where the `new Rect(Rect source)` constructor was failing in some games, using the normal ctor now. * Added special support for `Vector2`, `Vector3`, `Vector4`, `Quaternion`, `Color` and `Rect` structs in the reflection inspector to allow for easier editing. * Several improvements to GameObject Inspector, such as position/rotation freezing, local/global context, and an improved way to edit the transform values.
28 lines
691 B
C#
28 lines
691 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
using UnityEngine;
|
|
|
|
namespace Explorer
|
|
{
|
|
public static class UnstripExtensions
|
|
{
|
|
public static Rect GetLastUnstripped(this GUILayoutGroup group)
|
|
{
|
|
Rect result;
|
|
if (group.m_Cursor > 0 && group.m_Cursor <= group.entries.Count)
|
|
{
|
|
GUILayoutEntry guilayoutEntry = group.entries[group.m_Cursor - 1];
|
|
result = guilayoutEntry.rect;
|
|
}
|
|
else
|
|
{
|
|
result = GUILayoutEntry.kDummyRect;
|
|
}
|
|
return result;
|
|
}
|
|
}
|
|
}
|