can't load gameobject in runtime from datapersistentpath
up vote
0
down vote
favorite
I have A directory in the dataPersistentPath, the name of directory is "FBXFiles".
so the access is:
Path.Combine(Application.persistentDataPath, "FBXFiles");
I want to load all of the files in this directory as GameObjects (or UnityEngine.Object)
One more thing, this application is for hololens, so I can't use the UnityEditor namespace...
How can I do that? I've tried with assetBundle but no luck...how can I do it at runtime...?
c# unity3d hololens
add a comment |
up vote
0
down vote
favorite
I have A directory in the dataPersistentPath, the name of directory is "FBXFiles".
so the access is:
Path.Combine(Application.persistentDataPath, "FBXFiles");
I want to load all of the files in this directory as GameObjects (or UnityEngine.Object)
One more thing, this application is for hololens, so I can't use the UnityEditor namespace...
How can I do that? I've tried with assetBundle but no luck...how can I do it at runtime...?
c# unity3d hololens
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I have A directory in the dataPersistentPath, the name of directory is "FBXFiles".
so the access is:
Path.Combine(Application.persistentDataPath, "FBXFiles");
I want to load all of the files in this directory as GameObjects (or UnityEngine.Object)
One more thing, this application is for hololens, so I can't use the UnityEditor namespace...
How can I do that? I've tried with assetBundle but no luck...how can I do it at runtime...?
c# unity3d hololens
I have A directory in the dataPersistentPath, the name of directory is "FBXFiles".
so the access is:
Path.Combine(Application.persistentDataPath, "FBXFiles");
I want to load all of the files in this directory as GameObjects (or UnityEngine.Object)
One more thing, this application is for hololens, so I can't use the UnityEditor namespace...
How can I do that? I've tried with assetBundle but no luck...how can I do it at runtime...?
c# unity3d hololens
c# unity3d hololens
asked yesterday
Nadav
176
176
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
1
down vote
accepted
Unity does not support importing objects as game objects at runtime, since it optimizes them and converts them to game ready assets at build time and in the editor. You can try including a library to load these objects, maybe as something open source like OBJ and create new game objects with materials but I am not sure this will work. Or use asset bundles, but generally System.IO and asset bundles are a bad move. Unity has built in functions for accessing asset bundles.
Best of luck.
Yeah but how...? Can i create assetbundle and add files into it at runtime?
– Nadav
17 hours ago
You can try this: answers.unity.com/questions/10868/…. They are making their own asset bundles.
– CausticLasagne
13 hours ago
OK looks good... I'll try if I won't find another solution (maybe I'll upload asset bundle files that I'll create with unity and that's it)
– Nadav
12 hours ago
Don't forget to mark the answer. Cheers!
– CausticLasagne
8 hours ago
add a comment |
up vote
1
down vote
You can't do this
FBX files are assets that require importing and conversion to Unity's (internal) format. You need to use Asset Bundles.
But how should i use the assetbundles? I want to download fbx files to this directory but not to build again...
– Nadav
17 hours ago
I haven't used asset bundles yet myself, but "downloading to a directory and not building again" is exactly what they're for.
– Draco18s
12 hours ago
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
1
down vote
accepted
Unity does not support importing objects as game objects at runtime, since it optimizes them and converts them to game ready assets at build time and in the editor. You can try including a library to load these objects, maybe as something open source like OBJ and create new game objects with materials but I am not sure this will work. Or use asset bundles, but generally System.IO and asset bundles are a bad move. Unity has built in functions for accessing asset bundles.
Best of luck.
Yeah but how...? Can i create assetbundle and add files into it at runtime?
– Nadav
17 hours ago
You can try this: answers.unity.com/questions/10868/…. They are making their own asset bundles.
– CausticLasagne
13 hours ago
OK looks good... I'll try if I won't find another solution (maybe I'll upload asset bundle files that I'll create with unity and that's it)
– Nadav
12 hours ago
Don't forget to mark the answer. Cheers!
– CausticLasagne
8 hours ago
add a comment |
up vote
1
down vote
accepted
Unity does not support importing objects as game objects at runtime, since it optimizes them and converts them to game ready assets at build time and in the editor. You can try including a library to load these objects, maybe as something open source like OBJ and create new game objects with materials but I am not sure this will work. Or use asset bundles, but generally System.IO and asset bundles are a bad move. Unity has built in functions for accessing asset bundles.
Best of luck.
Yeah but how...? Can i create assetbundle and add files into it at runtime?
– Nadav
17 hours ago
You can try this: answers.unity.com/questions/10868/…. They are making their own asset bundles.
– CausticLasagne
13 hours ago
OK looks good... I'll try if I won't find another solution (maybe I'll upload asset bundle files that I'll create with unity and that's it)
– Nadav
12 hours ago
Don't forget to mark the answer. Cheers!
– CausticLasagne
8 hours ago
add a comment |
up vote
1
down vote
accepted
up vote
1
down vote
accepted
Unity does not support importing objects as game objects at runtime, since it optimizes them and converts them to game ready assets at build time and in the editor. You can try including a library to load these objects, maybe as something open source like OBJ and create new game objects with materials but I am not sure this will work. Or use asset bundles, but generally System.IO and asset bundles are a bad move. Unity has built in functions for accessing asset bundles.
Best of luck.
Unity does not support importing objects as game objects at runtime, since it optimizes them and converts them to game ready assets at build time and in the editor. You can try including a library to load these objects, maybe as something open source like OBJ and create new game objects with materials but I am not sure this will work. Or use asset bundles, but generally System.IO and asset bundles are a bad move. Unity has built in functions for accessing asset bundles.
Best of luck.
answered 17 hours ago
CausticLasagne
908
908
Yeah but how...? Can i create assetbundle and add files into it at runtime?
– Nadav
17 hours ago
You can try this: answers.unity.com/questions/10868/…. They are making their own asset bundles.
– CausticLasagne
13 hours ago
OK looks good... I'll try if I won't find another solution (maybe I'll upload asset bundle files that I'll create with unity and that's it)
– Nadav
12 hours ago
Don't forget to mark the answer. Cheers!
– CausticLasagne
8 hours ago
add a comment |
Yeah but how...? Can i create assetbundle and add files into it at runtime?
– Nadav
17 hours ago
You can try this: answers.unity.com/questions/10868/…. They are making their own asset bundles.
– CausticLasagne
13 hours ago
OK looks good... I'll try if I won't find another solution (maybe I'll upload asset bundle files that I'll create with unity and that's it)
– Nadav
12 hours ago
Don't forget to mark the answer. Cheers!
– CausticLasagne
8 hours ago
Yeah but how...? Can i create assetbundle and add files into it at runtime?
– Nadav
17 hours ago
Yeah but how...? Can i create assetbundle and add files into it at runtime?
– Nadav
17 hours ago
You can try this: answers.unity.com/questions/10868/…. They are making their own asset bundles.
– CausticLasagne
13 hours ago
You can try this: answers.unity.com/questions/10868/…. They are making their own asset bundles.
– CausticLasagne
13 hours ago
OK looks good... I'll try if I won't find another solution (maybe I'll upload asset bundle files that I'll create with unity and that's it)
– Nadav
12 hours ago
OK looks good... I'll try if I won't find another solution (maybe I'll upload asset bundle files that I'll create with unity and that's it)
– Nadav
12 hours ago
Don't forget to mark the answer. Cheers!
– CausticLasagne
8 hours ago
Don't forget to mark the answer. Cheers!
– CausticLasagne
8 hours ago
add a comment |
up vote
1
down vote
You can't do this
FBX files are assets that require importing and conversion to Unity's (internal) format. You need to use Asset Bundles.
But how should i use the assetbundles? I want to download fbx files to this directory but not to build again...
– Nadav
17 hours ago
I haven't used asset bundles yet myself, but "downloading to a directory and not building again" is exactly what they're for.
– Draco18s
12 hours ago
add a comment |
up vote
1
down vote
You can't do this
FBX files are assets that require importing and conversion to Unity's (internal) format. You need to use Asset Bundles.
But how should i use the assetbundles? I want to download fbx files to this directory but not to build again...
– Nadav
17 hours ago
I haven't used asset bundles yet myself, but "downloading to a directory and not building again" is exactly what they're for.
– Draco18s
12 hours ago
add a comment |
up vote
1
down vote
up vote
1
down vote
You can't do this
FBX files are assets that require importing and conversion to Unity's (internal) format. You need to use Asset Bundles.
You can't do this
FBX files are assets that require importing and conversion to Unity's (internal) format. You need to use Asset Bundles.
answered yesterday
Draco18s
9,85531940
9,85531940
But how should i use the assetbundles? I want to download fbx files to this directory but not to build again...
– Nadav
17 hours ago
I haven't used asset bundles yet myself, but "downloading to a directory and not building again" is exactly what they're for.
– Draco18s
12 hours ago
add a comment |
But how should i use the assetbundles? I want to download fbx files to this directory but not to build again...
– Nadav
17 hours ago
I haven't used asset bundles yet myself, but "downloading to a directory and not building again" is exactly what they're for.
– Draco18s
12 hours ago
But how should i use the assetbundles? I want to download fbx files to this directory but not to build again...
– Nadav
17 hours ago
But how should i use the assetbundles? I want to download fbx files to this directory but not to build again...
– Nadav
17 hours ago
I haven't used asset bundles yet myself, but "downloading to a directory and not building again" is exactly what they're for.
– Draco18s
12 hours ago
I haven't used asset bundles yet myself, but "downloading to a directory and not building again" is exactly what they're for.
– Draco18s
12 hours ago
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53137187%2fcant-load-gameobject-in-runtime-from-datapersistentpath%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password