I am having problems creating a working standalone build.
When starting the created executable It looks like this:
excerpts from the output_log file:
Unable to find shaders used for the terrain engine. Please include Nature/Terrain/Diffuse shader in Graphics settings.
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Material:Internal_CreateWithShader (UnityEngine.Material,UnityEngine.Shader)
at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.DaggerfallTerrain.InstantiateTerrain () [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.UpdateTerrainData (TerrainDesc terrainDesc) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.InitPlayerTerrain () [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.Update () [0x00000] in <filename unknown>:0
I manually added shader Nature/Terrain/Diffuse in the Project Settings->Graphics section. I don't understand why I still get the message from above...
How to correctly create a standalone build?
- Interkarma
- Posts: 7242
- Joined: Sun Mar 22, 2015 1:51 am
Re: How to correctly create a standalone build?
Try adding "Nature/Terrain/Standard". From memory this fixed it for me when I last created a Unity5 + DFTFU1.3 build. Let me know how you go.
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: How to correctly create a standalone build?
it eliminates the log message, but the output is still the same
in the output_log it is complaining a lot about NullReferenceException both coming from StreamingWorld as well as from IncreasedTerrainDistance...
tried to do only the scene without IncreasedTerrainDistance script, so the only remaining output_log error messages are:
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Material:Internal_CreateWithShader (UnityEngine.Material,UnityEngine.Shader)
at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.DaggerfallTerrain.InstantiateTerrain () [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.UpdateTerrainData (TerrainDesc terrainDesc) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.InitPlayerTerrain () [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.Update () [0x00000] in <filename unknown>:0
in the output_log it is complaining a lot about NullReferenceException both coming from StreamingWorld as well as from IncreasedTerrainDistance...
tried to do only the scene without IncreasedTerrainDistance script, so the only remaining output_log error messages are:
NullReferenceException
at (wrapper managed-to-native) UnityEngine.Material:Internal_CreateWithShader (UnityEngine.Material,UnityEngine.Shader)
at UnityEngine.Material..ctor (UnityEngine.Shader shader) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.DaggerfallTerrain.InstantiateTerrain () [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.UpdateTerrainData (TerrainDesc terrainDesc) [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.InitPlayerTerrain () [0x00000] in <filename unknown>:0
at DaggerfallWorkshop.StreamingWorld.Update () [0x00000] in <filename unknown>:0
- Interkarma
- Posts: 7242
- Joined: Sun Mar 22, 2015 1:51 am
Re: How to correctly create a standalone build?
Here's a rundown of how I create standalone builds.
1. Add all required shaders to Edit > Projects Settings > Graphics > Always included shaders. These are:
3. Use Ctrl+Shift+B to open build window. Click Project Settings and configure project name, render path, icon, etc.
4. Add current scene to build list.
5. Switch to target platform (e.g. Windows x86) and click Build. Select output path. Note: Creating Web & WebGL builds are a bit more advanced and best ignored until I finish writing up the tutorial for you guys.
6. Once build completed, copy Daggerfall's arena2 folder into the ApplicationName_Data folder created in your build path. DFTFU will automatically look in the Data folder for a valid arena2 path.
If you still have problems, zip up the entire project (don't just create a package) and put it somewhere I can grab it. I'm happy to take a look and help diagnose.
1. Add all required shaders to Edit > Projects Settings > Graphics > Always included shaders. These are:
- Daggerfall/Billboard Batch
- Daggerfall/Tilemap
- Nature/Terrain/Standard
- Plus Any other custom shaders required outside of DFTFU.
3. Use Ctrl+Shift+B to open build window. Click Project Settings and configure project name, render path, icon, etc.
4. Add current scene to build list.
5. Switch to target platform (e.g. Windows x86) and click Build. Select output path. Note: Creating Web & WebGL builds are a bit more advanced and best ignored until I finish writing up the tutorial for you guys.
6. Once build completed, copy Daggerfall's arena2 folder into the ApplicationName_Data folder created in your build path. DFTFU will automatically look in the Data folder for a valid arena2 path.
If you still have problems, zip up the entire project (don't just create a package) and put it somewhere I can grab it. I'm happy to take a look and help diagnose.
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: How to correctly create a standalone build?
ah thanks, i was definitely missing the billboardbatch and tilemap shaders
i no longer get the null reference error
I still have not succeeded completely though
current error is:
Texture is not accessible.
(Filename: Line: 330)
update:
it is working now and I don't know what made it work
The RealGrass mod is not showing the grass texture - where do i have to put it inside the folder structure to get it working?
i no longer get the null reference error
I still have not succeeded completely though
current error is:
Texture is not accessible.
(Filename: Line: 330)
update:
it is working now and I don't know what made it work
The RealGrass mod is not showing the grass texture - where do i have to put it inside the folder structure to get it working?
- Interkarma
- Posts: 7242
- Joined: Sun Mar 22, 2015 1:51 am
Re: How to correctly create a standalone build?
For those sorts of loose assets, create a folder in your project called Resources and drop the texture into that. You can have several Resources folders and they all get packed together into the final build.
DFTFU can also load raw arena2 files out of Resources (FileProxy supports memory/disk/Resources), but it's a bit slower and involves more prep than the method I use above. Great for WebPlayer and tablet builds though. I'll cover that in more detail when I finally get to that tutorial.
DFTFU can also load raw arena2 files out of Resources (FileProxy supports memory/disk/Resources), but it's a bit slower and involves more prep than the method I use above. Great for WebPlayer and tablet builds though. I'll cover that in more detail when I finally get to that tutorial.
- Nystul
- Posts: 1501
- Joined: Mon Mar 23, 2015 8:31 am
Re: How to correctly create a standalone build?
I managed to get everything to work except the RealGrass mod.
The texture is still missing, I tried putting it basically everywhere (in different Resource subfolder - and of course established the texture connection to this new location)
any idea why it won't load correctly? I see pixel-randomness bend in the wind
The texture is still missing, I tried putting it basically everywhere (in different Resource subfolder - and of course established the texture connection to this new location)
any idea why it won't load correctly? I see pixel-randomness bend in the wind