File tree Expand file tree Collapse file tree
Basis/Packages/com.basis.shim/Shims Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88namespace Basis . Shims
99{
10+ [ Obsolete ( "Use the direct interactable component instead. This is a shim for the old system and should be removed at a later point." ) ]
1011 public class BasisInteractableShim : BasisInteractableObject // Need to remove at a later point.
1112 {
1213 // public BasisObjectSyncNetworking syncNetworking;
Original file line number Diff line number Diff line change @@ -37,6 +37,22 @@ public static BasisNetworkShim MakeNetworkable( MonoBehaviour mb )
3737
3838 return mb . gameObject . AddComponent < BasisNetworkShim > ( ) ;
3939 }
40+
41+ [ Obsolete ( "Use the direct interactable component instead. This is a shim for the old system and should be removed at a later point." ) ]
42+ public static BasisInteractableShim MakeInteractable ( object o )
43+ {
44+ // Actually needs to be CilboxProxies.
45+ GameObject go = null ;
46+ if ( o is CilboxProxy )
47+ go = ( ( CilboxProxy ) o ) . gameObject ;
48+ else
49+ go = ( ( MonoBehaviour ) o ) . gameObject ;
50+
51+ BasisInteractableShim bi ;
52+ if ( go . TryGetComponent < BasisInteractableShim > ( out bi ) ) return bi ;
53+
54+ return go . AddComponent < BasisInteractableShim > ( ) ;
55+ }
4056 }
4157
4258
You can’t perform that action at this time.
0 commit comments