private void RegisterMonoBehaviours(GameObject obj, IDIContext sceneContext, IRemoteObjectsRecord ror) { ContextMonoBehaviour[] behaviours = obj.GetComponents <ContextMonoBehaviour>(); foreach (ContextMonoBehaviour mb in behaviours) { sceneContext.InjectDependencies(mb); } }
private void RegisterRemoteObject(object instance, bool hashOnly = false) { if (!RemoteObjectsHelper.IsRemoteObject(instance)) { return; } IRemoteObjectsRecord remoteRecord = (IRemoteObjectsRecord)this.ResolveInternal(typeof(IRemoteObjectsRecord), null, null, false); if (!hashOnly) { remoteRecord.Register(instance); } else { IRemoteObjectsHash hash = (IRemoteObjectsHash)this.ResolveInternal(typeof(IRemoteObjectsHash), null, null, false); hash.Register(instance); } }