Skip to content

Commit

Permalink
Move Toolbox assembly to the Runtime directory; fix InspectorUtility.…
Browse files Browse the repository at this point in the history
…SetIsEditorExpanded method
  • Loading branch information
arimger committed Dec 16, 2024
1 parent a07a3e9 commit b9467a4
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Assets/Editor Toolbox/Editor/Utilities/InspectorUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,15 +52,15 @@ internal static bool GetIsEditorExpanded(Editor editor)
/// </summary>
internal static void SetIsEditorExpanded(Editor editor, bool value)
{
InternalEditorUtility.SetIsInspectorExpanded(editor.target, true);
InternalEditorUtility.SetIsInspectorExpanded(editor.target, value);
//NOTE: in older versions Editor's foldouts are based on the m_IsVisible field and the Awake() method
#if !UNITY_2019_1_OR_NEWER
const string isVisibleFieldName = "m_IsVisible";
var isVisible = editor.GetType().GetField(isVisibleFieldName,
BindingFlags.Instance | BindingFlags.NonPublic);
if (isVisible != null)
{
isVisible.SetValue(editor, true);
isVisible.SetValue(editor, value);
}
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions Assets/Editor Toolbox/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -971,11 +971,11 @@ public void Usage()
Allows to serialize folders in form of assets and retrieve direct paths in Runtime.

```csharp
public SerializedDirectory serializeDirectory;
public SerializedDirectory serializedDirectory;

public void Usage()
{
string path = serializeDirectory.DirectoryPath;
string path = serializedDirectory.DirectoryPath;
}
```

Expand Down
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions Assets/Examples/Scenes/SampleScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -1828,7 +1828,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 5
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &1220714192
MonoBehaviour:
Expand Down Expand Up @@ -2207,7 +2207,7 @@ GameObject:
- component: {fileID: 1438743619}
- component: {fileID: 1438743618}
m_Layer: 0
m_Name: DecoratorDrawers [Sample]
m_Name: ToolboxDecoratorDrawers [Sample]
m_TagString: Untagged
m_Icon: {fileID: 2800000, guid: b105bf1fb7fe62e4baba0ffd7b433e7b, type: 3}
m_NavMeshLayer: 0
Expand Down Expand Up @@ -2285,7 +2285,7 @@ GameObject:
- component: {fileID: 1583836799}
- component: {fileID: 1583836798}
m_Layer: 0
m_Name: Special & Others [Sample]
m_Name: Toolbox Special & Others [Sample]
m_TagString: Untagged
m_Icon: {fileID: 2800000, guid: b105bf1fb7fe62e4baba0ffd7b433e7b, type: 3}
m_NavMeshLayer: 0
Expand Down Expand Up @@ -2336,7 +2336,7 @@ Transform:
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1584091011
GameObject:
Expand Down Expand Up @@ -2456,7 +2456,7 @@ GameObject:
- component: {fileID: 1670253092}
- component: {fileID: 1670253093}
m_Layer: 0
m_Name: ConditionDrawers [Sample]
m_Name: ToolboxConditionDrawers [Sample]
m_TagString: Untagged
m_Icon: {fileID: 2800000, guid: b105bf1fb7fe62e4baba0ffd7b433e7b, type: 3}
m_NavMeshLayer: 0
Expand Down

0 comments on commit b9467a4

Please sign in to comment.