|
@@ -3,6 +3,7 @@
|
|
|
|
|
|
|
|
#include "ModelImporter.h"
|
|
#include "ModelImporter.h"
|
|
|
#include "FolderImporter.h"
|
|
#include "FolderImporter.h"
|
|
|
|
|
+#include "SceneImporter.h"
|
|
|
#include "Asset.h"
|
|
#include "Asset.h"
|
|
|
|
|
|
|
|
namespace ToolCore
|
|
namespace ToolCore
|
|
@@ -30,7 +31,7 @@ bool Asset::Import()
|
|
|
return importer_->Import(guid_);
|
|
return importer_->Import(guid_);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void Asset::SetPath(const String& path)
|
|
|
|
|
|
|
+bool Asset::SetPath(const String& path)
|
|
|
{
|
|
{
|
|
|
FileSystem* fs = GetSubsystem<FileSystem>();
|
|
FileSystem* fs = GetSubsystem<FileSystem>();
|
|
|
|
|
|
|
@@ -54,8 +55,17 @@ void Asset::SetPath(const String& path)
|
|
|
name_ = GetFileName(path);
|
|
name_ = GetFileName(path);
|
|
|
importer_ = new ModelImporter(context_);
|
|
importer_ = new ModelImporter(context_);
|
|
|
}
|
|
}
|
|
|
|
|
+ else if (ext == ".scene")
|
|
|
|
|
+ {
|
|
|
|
|
+ name_ = GetFileName(path);
|
|
|
|
|
+ importer_ = new SceneImporter(context_);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (importer_.Null())
|
|
|
|
|
+ return false;
|
|
|
|
|
+
|
|
|
String assetPath = path + ".asset";
|
|
String assetPath = path + ".asset";
|
|
|
|
|
|
|
|
if (fs->FileExists(assetPath))
|
|
if (fs->FileExists(assetPath))
|