x


Loading a resource file from external plugin dll

Hey all, currently I use a function loadFreeImage in a c++ based external dll to load a file (black and white texture image used for a haptic surface).

Image *img = loadFreeImage( HAPTEXTURESLOC + imageName + HAPTEXTUREEXTENSION );

So in the editor build I can do something like: loadFreeImage("Assets/Textures/Haptic_Tex/Test.tga");

My question is:
In a stand-alone PC build, can I load this same file without manually including the assets folder? I understand the use of Application.persistantDataPath which gets me to a directory like C:/Dev/DW_Projects/HapNan/HapNan_UnityProject/Builds/PathTest_Data (the location of the build).
Then I get confused about doing something like a Resources.load or something similar in c++ to pull the file out of the datapath, is it baked into the resources somehow?

more ▼

asked Nov 18 '11 at 11:41 PM

bagel gravatar image

bagel
1 1 1 2

(comments are locked)
10|3000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Topics:

x396
x298
x218
x53
x19

asked: Nov 18 '11 at 11:41 PM

Seen: 1141 times

Last Updated: Nov 21 '11 at 02:39 PM