How add file to resources folder?

Hello!

I created a button, and I want to open a file:

if (GUILayout.Button("Open file"))
	{

			Application.OpenURL("file:///" + Application.dataPath + "/Resources/fileName.pdf");
	}

In the editor it works, with some changes, but I don’t no, how to add the file, to the
resources, when I create the build.

How can I add the file to the Resources folder, when create a build?

As far as i know, as long as you have the file in the following location, it should be built into the game automaticly.

project folder\Assets\Resources{yourfolderstructure}{Yourfiles}

The point of the Resources folder is to tell Unity that everything in it must be packed in the final .unity3d, whereas the other assets are packed only if a GameObject is using them explicitely. Conclusion, there is no Resources folder once the game is built.

I think you are looking for asset bundles.

I understand, but:

  1. create a new porject
  2. import a .pdf file
  3. ???
  4. create a script
  5. build
    After that the .pdf file should be locate in the resources folder (project_folder/build/project_name/resources), because the file don’t will be there, you can’t open it.

I don’t now how can attach this file to a scipt. Asset bundles how works?