Select Asset from Folder

 Unreal

AMyGameGameModeBase::AMyGameGameModeBase() {

static ConstructorHelpers::FObjectFinder<USkeletalMesh> PlayerMesh(TEXT("/Game/MyContent/Get/thePlayer3DModel.thePlayer3DModel"));//D:\GamEngine\UnrelEngine\Projects\4.25\MyGame\Content\MyContent\Get\thePlayer3DModel.fbx

if (PlayerMesh.Succeeded()) this->GetPawn()->FindComponentByClass<USkeletalMeshComponent>()->SetSkeletalMesh(SetPlayerMesh.Object);

}

Unity

    public GameObject playerMesh;

    //[MenuItem("AssetDatabase/AddMesh")]//using UnityEditor;

    //static void ObjectFind() { var playerMesh = (GameObject)AssetDatabase.LoadAssetAtPath("Assets/MyContent/Get/thePlayer3DModel.fbx", typeof(GameObject));//D:\Game_-Devlopment\Game-Engine\Unity\Project\MyGame\Assets\MyContent\Get\thePlayer3DModel.fbx

                  //GameObject loadMesh = playerMesh; }

Comments

Popular posts from this blog

Play Sound

Open Level

UI & Widgets