-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from SideQuestVR/dev
dev to main, 2.2.0
- Loading branch information
Showing
125 changed files
with
14,293 additions
and
1,262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.