Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

namespace Basis.Shims
{
[Obsolete("Use the direct interactable component instead. This is a shim for the old system and should be removed at a later point.")]
public class BasisInteractableShim : BasisInteractableObject // Need to remove at a later point.
{
// public BasisObjectSyncNetworking syncNetworking;
Expand Down
16 changes: 16 additions & 0 deletions Basis/Packages/com.basis.shim/Shims/BasisShims.cs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,22 @@ public static BasisNetworkShim MakeNetworkable( MonoBehaviour mb )

return mb.gameObject.AddComponent<BasisNetworkShim>();
}

[Obsolete("Use the direct interactable component instead. This is a shim for the old system and should be removed at a later point.")]
public static BasisInteractableShim MakeInteractable( object o )
{
// Actually needs to be CilboxProxies.
GameObject go = null;
if( o is CilboxProxy )
go = ((CilboxProxy)o).gameObject;
else
go = ((MonoBehaviour)o).gameObject;

BasisInteractableShim bi;
if( go.TryGetComponent<BasisInteractableShim>( out bi ) ) return bi;

return go.AddComponent<BasisInteractableShim>();
}
}


Expand Down
Loading