Skip to content

Commit

Permalink
Merge pull request #65 from SideQuestVR/dev
Browse files Browse the repository at this point in the history
dev to main, 2.2.0
  • Loading branch information
mikeskydev authored Oct 30, 2024
2 parents 8e92cd5 + f56bcba commit 37544be
Show file tree
Hide file tree
Showing 125 changed files with 14,293 additions and 1,262 deletions.
8 changes: 7 additions & 1 deletion Editor/Banter.SDKEditor.asmdef
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"GUID:23f3c6063e13e4fd9addce3606ff4e42",
"GUID:315d634a9ac6d460a9515f5a56be6311",
"GUID:6055be8ebefd69e48b49212b09b47b2f",
"GUID:00a9e2367449a2e4d89a262276b0dac1"
"GUID:00a9e2367449a2e4d89a262276b0dac1",
"GUID:f06555f75b070af458a003d92f9efb00"
],
"includePlatforms": [
"Editor"
Expand All @@ -25,6 +26,11 @@
"name": "com.unity.visualscripting",
"expression": "1.7.8",
"define": "BANTER_VISUAL_SCRIPTING"
},
{
"name": "com.unity.timeline",
"expression": "1.7.8",
"define": "BANTER_VS_TIMELINE"
}
],
"noEngineReferences": false
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterAssetBundleEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
55 changes: 55 additions & 0 deletions Editor/Components/BanterAttachedObjectEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
using UnityEditor;
using UnityEngine;
using UnityEngine.UIElements;
using Banter.SDK;

namespace Banter.SDKEditor
{
[CustomEditor(typeof(BanterAttachedObject))]
public class BanterAttachedObjectEditor : Editor
{
void OnEnable()
{
if (target is BanterAttachedObject)
{
var script = (BanterAttachedObject)target;
// script.gameObject.GetComponent<MeshFilter>().hideFlags = HideFlags.HideInInspector;
var path = AssetDatabase.GetAssetPath(script);
}
}
public override bool UseDefaultMargins() => false;
public override VisualElement CreateInspectorGUI()
{
var script = (BanterAttachedObject)target;
Editor editor = Editor.CreateEditor(script);
// script.gameObject.GetComponent<MeshFilter>().hideFlags = HideFlags.HideInInspector;
VisualElement myInspector = new VisualElement();

var _mainWindowStyleSheet = Resources.Load<StyleSheet>("BanterCustomInspector");
myInspector.styleSheets.Add(_mainWindowStyleSheet);

var title = new Label("PROPERTIES SEEN BY JS");
title.style.fontSize = 14;
myInspector.Add(title);
var seeFields = new Label("uid, attachmentPosition, attachmentRotation, attachmentType, avatarAttachmentType, avatarAttachmentPoint, attachmentPoint, autoSync, jointAvatar, ");
seeFields.style.unityFontStyleAndWeight = FontStyle.Bold;
seeFields.style.flexWrap = Wrap.Wrap;
seeFields.style.whiteSpace = WhiteSpace.Normal;
seeFields.style.marginBottom = 10;
seeFields.style.marginTop = 10;
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
//#endif

return myInspector;
}
}
}
11 changes: 11 additions & 0 deletions Editor/Components/BanterAttachedObjectEditor.cs.meta

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions Editor/Components/BanterAudioSourceEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterBillboardEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterBoxColliderEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterBrowserEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterCapsuleColliderEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterColliderEventsEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ public override VisualElement CreateInspectorGUI()
myInspector.styleSheets.Add(_mainWindowStyleSheet);


#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterConfigurableJointEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterGLTFEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterGeometryEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterInvertedMeshEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ public override VisualElement CreateInspectorGUI()
myInspector.styleSheets.Add(_mainWindowStyleSheet);


#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterKitItemEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterMaterialEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
8 changes: 4 additions & 4 deletions Editor/Components/BanterMeshColliderEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ public override VisualElement CreateInspectorGUI()
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
19 changes: 15 additions & 4 deletions Editor/Components/BanterMirrorEditor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,26 @@ public override VisualElement CreateInspectorGUI()
var _mainWindowStyleSheet = Resources.Load<StyleSheet>("BanterCustomInspector");
myInspector.styleSheets.Add(_mainWindowStyleSheet);

var title = new Label("PROPERTIES SEEN BY JS");
title.style.fontSize = 14;
myInspector.Add(title);
var seeFields = new Label("renderTextureSize, cameraClear, backgroundColor, ");
seeFields.style.unityFontStyleAndWeight = FontStyle.Bold;
seeFields.style.flexWrap = Wrap.Wrap;
seeFields.style.whiteSpace = WhiteSpace.Normal;
seeFields.style.marginBottom = 10;
seeFields.style.marginTop = 10;
seeFields.style.color = Color.gray;
myInspector.Add(seeFields);

#if BANTER_EDITOR
//#if BANTER_EDITOR
var foldout = new Foldout();
foldout.text = "Advanced Properties";
foldout.text = "Available Properties";
IMGUIContainer inspectorIMGUI = new IMGUIContainer(() => { editor.OnInspectorGUI(); });
foldout.value = false;
foldout.value = false;
foldout.Add(inspectorIMGUI);
myInspector.Add(foldout);
#endif
//#endif

return myInspector;
}
Expand Down
Loading

0 comments on commit 37544be

Please sign in to comment.