public static SyncObjectBinding CreateInstance(Transform root, string source, SyncObjectInstance instance, IObjectCache objectCache) { var objectKey = new StreamKey(source, PersistentKey.GetKey <SyncObject>(instance.ObjectId)); var syncObject = objectCache.CreateInstance(objectKey); if (syncObject == null) { Debug.LogWarning("Unable to instantiate SyncObject '" + instance.ObjectId + "'"); return(null); } var gameObject = syncObject.gameObject; gameObject.name = instance.Name; gameObject.transform.parent = root; ImportersUtils.SetTransform(gameObject.transform, instance.Transform); ImportersUtils.SetMetadata(gameObject, instance.Metadata); return(syncObject); }