public static GLTFShape CreateEntityWithGLTFShape(ParcelScene scene, Vector3 position, GLTFShape.Model model) { DecentralandEntity entity = null; return(CreateEntityWithGLTFShape(scene, position, model, out entity)); }
public static GLTFShape CreateEntityWithGLTFShape(ParcelScene scene, Vector3 position, GLTFShape.Model model, out DecentralandEntity entity) { entity = CreateSceneEntity(scene); GLTFShape gltfShape = AttachGLTFShape(entity, scene, position, model); return(gltfShape); }
public static GLTFShape AttachGLTFShape(DecentralandEntity entity, ParcelScene scene, Vector3 position, GLTFShape.Model model) { string componentId = GetComponentUniqueId(scene, "gltfShape", (int)CLASS_ID.GLTF_SHAPE, entity.entityId); GLTFShape gltfShape = SharedComponentCreate <GLTFShape, GLTFShape.Model>(scene, CLASS_ID.GLTF_SHAPE, model); SetEntityTransform(scene, entity, position, Quaternion.identity, Vector3.one); SharedComponentAttach(gltfShape, entity); return(gltfShape); }