public static async UniTask <GameObject> InstantiateVRM(byte[] bytes, Vector3 position, Quaternion rotation) { GameObject LoadingModel = await VRMLoader.LoadVRMFile(bytes); LoadingModel.transform.position = new Vector3(0, -1, 0) + position; LoadingModel.transform.rotation = rotation; return(LoadingModel); }
public static async UniTask <GameObject> InstantiateVRM(byte[] bytes, Transform parent) { GameObject LoadingModel = await VRMLoader.LoadVRMFile(bytes); LoadingModel.transform.position = new Vector3(0, -1, 0); LoadingModel.transform.Rotate(new Vector3(0, 0, 0)); LoadingModel.transform.SetParent(parent); return(LoadingModel); }
//バイト配列からVroidを作成 public static async UniTask <GameObject> InstantiateVRM(byte[] bytes) { //バイト配列からVRMファイルが生成されるまで待ってLoadingModelに格納する GameObject LoadingModel = await VRMLoader.LoadVRMFile(bytes); //モデルをワールド上に配置します LoadingModel.transform.position = new Vector3(0, -1, 0); LoadingModel.transform.Rotate(new Vector3(0, 0, 0)); return(LoadingModel); }