Instantiating an Imported locally stored .obj File - file

As you may have understood from the title of my question, I am trying to Instantiate a .obj file that is locally stored on the device with an already given path.
I have already tried to load it as an assetBundle using the WWW method, but it didn't work. I asked a question before on this forum (see here: How To Load A Local File as an AssetBundle with WWW), but I thought that maybe I was going completely in the wrong direction to do this, maybe there is another way to do it. Some people responded that I needed to build the asset before Instantiating it but I didn't understand.
I was hoping for any suggestions on how to do this
Than you in advance :)
For more information, please see other question: How To Load A Local File as an AssetBundle with WWW

Related serialization data is generated when the asset is imported into Unity. And Unity needs these serialization information when managing these assets, so you can import the obj file into the Unity editor, create an assetbundle, and then load it through the associated api.
You can refer to this document:
https://docs.unity3d.com/Manual/AssetBundlesIntro.html

Related

Configuration JSON file not found after build react application

I have a react application which is relying on a configuration json file for its execution. Plan is to update the JSON file after build for different environment. Never tried before.
So I imported my JSON file like this
import data from './config.json'
So I was able to use the json properties in my application TS file while debugging from VS.
But I tried to build the app, but I cant find that file in any of the build path.
What I did wrong? Or how can I achieve above requirement.
Ultimately I need to update my JSON file while deploying into different environments which is I am trying to achieve.
During the build process your .json file will be incorporated into the .js files. I don't know many details about this, but I believe that it is not possible to do what you want.
What might help you is the use of environment variables. But it will still be necessary specific builds for each environment.

How can I create an add folder functionality to my React CMS application?

Click here to see a picture of what I mean
I haven't tried anything yet because I'm not sure how to even approach this problem. I'm not even sure what to Google. I do, however, have a pretty good handle on React. Thanks!
Update: The folders will not be storing files, just hyperlinks.
You need to model the problem space first. i.e. models for folders, and files. Each having properties (name, etc.) and associations (folders can have many files and subfolders).
To store the physical files you can use a third-party service like Amazon S3.
This would get you started at least.

Dart: Accessing a resource out side the project|web/ directory

I have a web-app(browser based) which needs to access a folder full of icons that resides outside the web folder.
This folder MUST be outside the web folder, and would ideally exist outside the project folder all together
however, when specifying the path to the folder neither "../" or making use of a symlink will work
when the page attempts to load the image I always get
"[web] GET /Project|web/icons/img.png => Could not find asset Project|web/icons/img.png."
however I set the image source to "../icons/img.png"
how can i get dart to access this file properly
PS: I attempted a symlink to another part of the filesystem (where the images would be kept ideally) however this did not work either.
The web server integrated into DartEditor or pub serve only serves directories that are added as folders to the files view. When you add the folder to DartEditor you should be able to access the files. This is just for development.
You have also to find a solution for when you deploy your server app. It would be a hazardous security issue when you could access files outside the project directory. Where should the server draw the line? If this would be possible your entire server would be accessible to the world.
Like #Robert asked, I also have a hard time imaging why the files must not be in the project folder.
If you want to reuse the icons/images between different projects you could create a resource package that contains only those images and add them as a dependency to your project.
If you want a better answer you need to provide more information about your requirements.
If you wrote your own server (by using the HttpServer class) it may be possible to use the VirtualDirectory to server your external files.
Looking at look the dartiverse_search example may give you some ideas.
You could put them in the lib directory and refer to them via /packages/Project/...
Or in another package, in which case they would be in a different place in the file system. But as other people have said, your requirement seems odd.

Play Framework 2 - How to create a custom log file in scala

I am working with play framework and scala and I'd like to create several log files instead of using the default log file for everything.
I suppose I have to specify the route of the file(.log) I want to write in but I don't know how neither where. And I think I have to create a .scala file to define my logger but I don't know what to put inside.
Anyone knows how to do this?
Thanks in advance.
Configuration of the logging is explained in the documentation here : Settings Logger

How to get the directory tree from the client

I'm trying to make a website where a user can choose a directory from his/her pc. Then i want to get a full directory tree from that point. So that i can process the filenames. It's not necessary to upload anything. Just the filenames are enough.
The closest thing i have seen is the upload procedure on http://www.connect.garmin.com.
When you plug in your gps and click on upload. The site gives you a full list of files that can be uploaded from your gps and whether or not you have already uploaded it.
How can this be done? PHP, javascript or a plugin in python?
it looks like there are a few people that had the same question that you did, here is a Link to a blog that I found on another Question on SO
HTML5 Upload Blog
here is the SO Question I found it on
Html 5 File upload
there is a lot of information on that blog that is very useful and I think that you will find everything that you are asking there.
Most of the File Browsing is done by the clients Web Browser so you won't have to worry about coding the actual pop up window. you just have to give the browser the type of files that you are looking for.

Resources