Switch case initialisation error fix

This commit is contained in:
Xiao Qi 2022-11-01 00:50:57 +08:00
parent 220e1a7d8b
commit a8f5d021d3
1 changed files with 3 additions and 6 deletions

View File

@ -157,20 +157,17 @@ namespace SHADE
{ {
case AssetType::PREFAB: case AssetType::PREFAB:
newPath += PREFAB_FOLDER; newPath += PREFAB_FOLDER;
auto prefab = new SHPrefabAsset(); data = new SHPrefabAsset();
data = prefab;
break; break;
case AssetType::SCENE: case AssetType::SCENE:
newPath += SCENE_FOLDER; newPath += SCENE_FOLDER;
auto scene = new SHSceneAsset(); data = new SHSceneAsset();
data = scene;
break; break;
case AssetType::MATERIAL: case AssetType::MATERIAL:
newPath += MATERIAL_FOLDER; newPath += MATERIAL_FOLDER;
auto material = new SHMaterialAsset(); data = new SHMaterialAsset();
data = material;
break; break;
default: default: