private void RpcFireCloneHook(GameObject clonedFrom) { var comps = GetComponents <IOnStageClient>(); if (comps != null) { foreach (var comp in comps) { comp.GoingOnStageClient(OnStageInfo.Cloned(clonedFrom)); } } }
public void FireCloneHooks(GameObject clonedFrom) { var comps = GetComponents <IOnStageServer>(); if (comps != null) { foreach (var comp in comps) { comp.GoingOnStageServer(OnStageInfo.Cloned(clonedFrom)); } } var clientComps = GetComponents <IOnStageClient>(); if (clientComps != null) { foreach (var comp in clientComps) { comp.GoingOnStageClient(OnStageInfo.Cloned(clonedFrom)); } } RpcFireCloneHook(clonedFrom); }