Skip to content

Commit 6a94d0a

Browse files
committed
webgl build fix, scene view navigation fixes, mesh defomrer fixes, manual uv editor
1 parent d7c7374 commit 6a94d0a

55 files changed

Lines changed: 5020 additions & 3702 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Assets/Battlehub/RTCommon/Scripts/ExposeToEditor.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ public class ExposeToEditorUnityEvent : UnityEvent<ExposeToEditor> { }
2727
[DisallowMultipleComponent]
2828
public class ExposeToEditor : MonoBehaviour
2929
{
30+
public const string HierarchyRootTag = "HierarchyRoot";
31+
3032
public static event ExposeToEditorEvent _Awaked;
3133
public static event ExposeToEditorEvent _Destroying;
3234
public static event ExposeToEditorEvent _Destroyed;
@@ -216,7 +218,7 @@ private void Awake()
216218
bool visible = (hideFlags & HideFlags.HideInHierarchy) == 0;
217219
if (visible)
218220
{
219-
if (transform.parent != null && transform.parent.GetComponent<ExposeToEditor>() == null)
221+
if (transform.parent != null && transform.parent.GetComponent<ExposeToEditor>() == null && transform.parent.tag != HierarchyRootTag)
220222
{
221223
//gameObject.hideFlags = HideFlags.HideInHierarchy;
222224
visible = false;

Assets/Battlehub/RTCommon/Scripts/RTEBase.cs

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,8 @@ RuntimeWindow[] Windows
209209
void Delete(GameObject[] go);
210210
void Close();
211211

212+
void AddGameObjectToHierarchy(GameObject go, bool scaleStays = true);
213+
212214
Coroutine StartCoroutine(IEnumerator method);
213215
}
214216

@@ -223,11 +225,11 @@ public class RTEBase : MonoBehaviour, IRTE
223225
[SerializeField]
224226
protected EventSystem m_eventSystem;
225227

226-
//[SerializeField]
227-
//private ComponentEditorSettings m_componentEditorSettings = new ComponentEditorSettings(true, true, true, true);
228-
229228
[SerializeField]
230229
private CameraLayerSettings m_cameraLayerSettings = new CameraLayerSettings(20, 21, 4, 17, 18, 19, 16);
230+
[SerializeField]
231+
private bool m_createHierarchyRoot = false;
232+
231233
[SerializeField]
232234
private bool m_useBuiltinUndo = true;
233235

@@ -708,6 +710,17 @@ protected virtual void Awake()
708710
bool isOpened = m_isOpened;
709711
m_isOpened = !isOpened;
710712
IsOpened = isOpened;
713+
714+
if(m_createHierarchyRoot)
715+
{
716+
GameObject hierarchyRoot = GameObject.FindGameObjectWithTag(ExposeToEditor.HierarchyRootTag);
717+
if(hierarchyRoot == null)
718+
{
719+
hierarchyRoot = new GameObject("HierarchyRoot");
720+
}
721+
hierarchyRoot.transform.position = Vector3.zero;
722+
hierarchyRoot.tag = ExposeToEditor.HierarchyRootTag;
723+
}
711724
}
712725

713726
protected virtual void Start()
@@ -1140,11 +1153,29 @@ public void Delete(GameObject[] gameObjects)
11401153
}
11411154
}
11421155

1143-
11441156
public void Close()
11451157
{
11461158
IsOpened = false;
11471159
Destroy(gameObject);
11481160
}
1161+
1162+
public void AddGameObjectToHierarchy(GameObject go, bool scaleStays = true)
1163+
{
1164+
if(m_createHierarchyRoot)
1165+
{
1166+
GameObject hierarchyRoot = GameObject.FindGameObjectWithTag(ExposeToEditor.HierarchyRootTag);
1167+
if(hierarchyRoot != null)
1168+
{
1169+
Vector3 localScale = go.transform.localScale;
1170+
1171+
go.transform.SetParent(hierarchyRoot.transform, true);
1172+
1173+
if(scaleStays)
1174+
{
1175+
go.transform.localScale = localScale;
1176+
}
1177+
}
1178+
}
1179+
}
11491180
}
11501181
}

Assets/Battlehub/RTCommon/Scripts/RuntimeWindow.cs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,14 @@ public int Depth
9292
set { m_depth = value; }
9393
}
9494

95+
[SerializeField]
96+
private bool m_forceUseRenderTextures = false;
97+
protected bool ForceUseRenderTextures
98+
{
99+
get { return m_forceUseRenderTextures; }
100+
set { m_forceUseRenderTextures = value; }
101+
}
102+
95103
private Vector3 m_position;
96104
private Rect m_rect;
97105
private RectTransform m_rectTransform;
@@ -171,7 +179,7 @@ public virtual Pointer Pointer
171179
protected override void AwakeOverride()
172180
{
173181
base.AwakeOverride();
174-
if(!RenderPipelineInfo.UseRenderTextures)
182+
if(!RenderPipelineInfo.UseRenderTextures && !ForceUseRenderTextures)
175183
{
176184
if(Camera != null)
177185
{

Assets/Battlehub/RTEditor/Prefabs/AnimationEditor/AnimationSelectPropertiesDialog.prefab

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ MonoBehaviour:
110110
m_activateOnAnyKey: 0
111111
m_canActivate: 1
112112
m_windowType: 109
113+
m_forceUseRenderTextures: 0
113114
m_background: {fileID: 0}
114115
m_camera: {fileID: 0}
115116
m_pointer: {fileID: 0}
@@ -145,17 +146,17 @@ PrefabInstance:
145146
- target: {fileID: 114171284073095840, guid: 370f94e0ffbc8b645974abea347d3405,
146147
type: 3}
147148
propertyPath: m_Color.r
148-
value: 0.8867924
149+
value: 0.15294118
149150
objectReference: {fileID: 0}
150151
- target: {fileID: 114171284073095840, guid: 370f94e0ffbc8b645974abea347d3405,
151152
type: 3}
152153
propertyPath: m_Color.g
153-
value: 0
154+
value: 0.15294118
154155
objectReference: {fileID: 0}
155156
- target: {fileID: 114171284073095840, guid: 370f94e0ffbc8b645974abea347d3405,
156157
type: 3}
157158
propertyPath: m_Color.b
158-
value: 0
159+
value: 0.15294118
159160
objectReference: {fileID: 0}
160161
- target: {fileID: 114171284073095840, guid: 370f94e0ffbc8b645974abea347d3405,
161162
type: 3}

0 commit comments

Comments
 (0)