Could not create a custom UI Bug?

Pixellore posted this 06 November 2015

Could not create a custom UI for the shader 'PicaVoxel/PicaVoxel PBR'. The shader has the following: 'CustomEditor = ShaderForgeMaterialInspector'. Does the custom editor specified include its namespace? And does the class either derive from ShaderGUI or MaterialEditor? UnityEditor.DockArea:OnGUI()

Ok, I am using Unity 5,2,2f1 And getting this error when selecting the chunk object.

Also couple of suggestions.

It would be nice to be able to choose the layer which the chunks gets implemented, so that when using inside Unity, I can opt out selecting the chunks every time by locking the layer.

Order By: Standard | Newest | Votes
GarethIW posted this 06 November 2015

This bug is a side-effect of using ShaderForge to create the shaders. ShaderForge has a replacement inspector for the shaders, so when ShaderForge is not in the project you get these errors. I'm not sure if that's a ShaderForge bug or an option I need to set somewhere.

Either way, it's on the list for the next release, and it's not actually breaking any functionality in the meantime.

The chunks (should) take on the layer of the parent volume when generated. Is there a use case for having the chunks on a different layer to the volume?

One thing that I am doing in a future release is having chunk options for shadow cast/receive and physics material, as you currently have to change that each time on all chunks if you need anything other than default.

Pixellore posted this 06 November 2015

I see.

Well, When you import a qb file, there is nothing much I can do to change the parent volume before it generates the chunks..

Also, is there some kind of delegate that I can opt in for post qb file import? So I can automatically set the center, move the matrix to zero position etc.

When you click a volume object in the scene, you sometimes gets to select the chunks, instead of the base volume object.. so having different layer for chunks may (hopefully) avoid selecting chunks if I lock the chunk layer.. (well this is just my idea..)

Pixellore posted this 06 November 2015

I also have a question about how Picavoxel is handling the mesh data it is generating..

So I can sort of understand the need of generating the mesh, but what happens if :

I create a volume, made a prefab from it.. But deleted the prefab after wards? Would it still have the old mesh somewhere in the project folder? If so , how do I "clean" it up?

Also, when I duplicate the instanced prefab, it seems to generate more data... but when I instantiate one from prefab by dragging another one into the scene, it seems to be ok..

I am little bit confused on this..

Pixellore posted this 08 November 2015

I am very confused with this meshstore thing..

I need to do a svn commit of my project , but I am not sure if I need to check in all those chunks...

Also, I am not sure if I did anything new, but it seems like it has created even more of them..

It can't be like this.. is there? surely, the prefab can store or reference correct mesh/collider mesh for each chunks... If there is meshstore assets that needs to be cleaned up,... there must be way to do this?

Or is meshstore folder just a temp stuff that I shouldn't need to check in? (after I made prefab out)

Pixellore posted this 14 November 2015

gone fishing?

GarethIW posted this 18 November 2015

I'll answer you questions in order:

  • There is no delegate/callback for post-import. You have access to all of the import code so you can implement this yourself if you need it. I replied to a similar question you had about this here:

  • If anyone can come up with an idea for selecting the parent volume rather than a chunk when clicking on the volume int he editor, then I would implement it in a heartbeat. I have tried many ways of doing this in the past with no success.

  • The mesh data stuff (including the difference between prefab and copy/duplicate) is explained in the manual on page 14:

  • I wish I could include a "clean up" mesh option for you. I really do. But again, I haven't found a way of doing this with the Unity editor API. If you take a look at EditorMenus.cs, you will see code that I commented out because it only works on the currently loaded scene, but if you're only ever working on one scene you could comment it back in and use it as a quick way of deleting unused meshes.

  • You can also delete the entire MeshStore folder and no damage will be done. Because all of the voxel data is serialized in the scene, you can always regenerate the meshes. Delete the MeshStore folder, then select all of your PicaVoxel volumes and re-generate chunks. Then you will be left with only the needed meshes. Although if you have prefabs with generated meshes, you will need to drag them back onto the scene, regenerate the meshes and then apply the prefab changes.

Pixellore posted this 19 November 2015

Humm.. ok..

My idea of selecting the parent volume rather than a chunk is as follows:

have a layer that is allocated for chunk and let user be able to choose it from the import menu. Perhaps with toggle box override checkbox.

Once it has imported , all chunks will be with a specific layer, so when user locks down that layer in Unity, user can't select the chunk in the scene view.

GarethIW posted this 23 November 2015

It's a good idea. I wouldn't do this on import (because not everybody uses the import functions), but it would be an option in the Volume inspector to change the layer assigned to the chunks. It would be either "Same as Voume" or a custom layer.

I'll add it to the to-do for the next version.

Our 132 members have posted 493 times in 119 discussions