// // /*=============================================================================== // // Copyright (C) 2022 PhantomsXR Ltd. All Rights Reserved. // // // // This file is part of the UnityFusion.Adapter.Runtime. // // // // The ARMOD-SDK cannot be copied, distributed, or made available to // // third-parties for commercial purposes without written permission of PhantomsXR Ltd. // // // // Contact nswell@phantomsxr.com for licensing requests. // // ===============================================================================*/ using UnityFusion.Runtime.Enviorment; using UnityFusion.Runtime.Intepreter; using Phantom.XRMOD.Core.Runtime; namespace UnityFusion.CLRBinding.Adapter { /// /// Base class for all MonoBehaviour-based cross-binding adapters. /// Facilitates the mapping between a Unity GameObject and an ILRuntime/CLR instance. /// public class BaseMonoCrossBindingAdaptor :XRMODBehaviour, CrossBindingAdaptorType { /// The associated ILRuntime/CLR instance. protected ILTypeInstance instance; /// The AppDomain where the instance resides. protected AppDomain appdomain; /// /// Initializes a new instance of the adapter. /// /// The source AppDomain. /// The hot-reload instance. public BaseMonoCrossBindingAdaptor(AppDomain _appdomain, ILTypeInstance _instance) { this.appdomain = _appdomain; this.instance = _instance; } /// Gets or sets the ILRuntime instance. public ILTypeInstance ILInstance { get => instance; set => instance = value; } /// Gets or sets the associated AppDomain. public UnityFusion.Runtime.Enviorment.AppDomain AppDomain { get => appdomain; set => appdomain = value; } /// Default constructor. public BaseMonoCrossBindingAdaptor(){} } }