44using UnityEngine ;
55using VRC . SDKBase ;
66
7- [ assembly: MelonInfo ( typeof ( Astrum . AstralXUtils ) , "AstralXUtils" , "0.1.0 " , downloadLink : "github.com/Astrum-Project/AstralXUtils" ) ]
7+ [ assembly: MelonInfo ( typeof ( Astrum . AstralXUtils ) , "AstralXUtils" , "0.1.1 " , downloadLink : "github.com/Astrum-Project/AstralXUtils" ) ]
88[ assembly: MelonGame ( "VRChat" , "VRChat" ) ]
99[ assembly: MelonColor ( ConsoleColor . DarkMagenta ) ]
1010
@@ -35,6 +35,8 @@ public override void OnSceneWasLoaded(int index, string _)
3535
3636 if ( index != 0 ) return ;
3737
38+ targetBone = UnityEngine . XR . XRDevice . isPresent ? VRCPlayerApi . TrackingDataType . LeftHand : VRCPlayerApi . TrackingDataType . Head ;
39+
3840 GameObject puppet = new ( "AstralXUtils-LineRenderer" ) ;
3941 UnityEngine . Object . DontDestroyOnLoad ( puppet ) ;
4042
@@ -50,7 +52,6 @@ public override void OnSceneWasLoaded(int index, string _)
5052 }
5153
5254 // todo: support wrong handed people
53- public override void OnApplicationLateStart ( ) => targetBone = UnityEngine . XR . XRDevice . isPresent ? VRCPlayerApi . TrackingDataType . LeftHand : VRCPlayerApi . TrackingDataType . Head ;
5455 private static VRCPlayerApi . TrackingDataType targetBone ;
5556
5657 // todo: optimize this
@@ -97,7 +98,11 @@ public override void OnUpdate()
9798 }
9899 }
99100
100- private static void Highlight ( GameObject go , bool state ) => HighlightsFX . prop_HighlightsFX_0 . Method_Public_Void_Renderer_Boolean_0 ( go ? . GetComponent < Renderer > ( ) , state ) ;
101+ private static void Highlight ( GameObject go , bool state )
102+ {
103+ if ( go == null ) return ;
104+ HighlightsFX . prop_HighlightsFX_0 . Method_Public_Void_Renderer_Boolean_0 ( go ? . GetComponent < Renderer > ( ) , state ) ;
105+ }
101106
102107 [ UIButton ( "XUtils" , "Destroy" ) ]
103108 public static void Destroy ( )
0 commit comments