FreyaHolmer / ShaderForge

A Shader Editor for Unity
2.64k stars 530 forks source link

Windows Editor didn't opened properly in Unity 2018.3 #5

Closed mufabil45 closed 4 years ago

mufabil45 commented 5 years ago

Hello, I've tried it on Unity 2018.3+, Do you have any plan to update it or wait until Unity 2018.3 fully released ? ,thanks in advanced.

2018-12-02 06_14_14-

Errors message when I'm opening the window

Jennal commented 5 years ago

Same problem here.

southrop commented 5 years ago

ShaderForge is discontinued and no longer supported.

@FreyaHolmer should probably consider archiving this repository or adding a notice to the description or root README to make it more obvious, because currently you have to navigate to ShaderForge/Shader Forge/Assets/ShaderForge/Readme.txt in order to see that notice.

darkhog commented 5 years ago

While that's true, people who have to rely on the legacy rendering pipeline for one reason or another (in my case it's performance - no joke, after porting my game to LWRP I had WORSE performance than I had with legacy pipeline so I have switched back) need a shader editor of some sort as shader graph doesn't support legacy pipeline.

This is the problematic code:

// Make sure it only renders using DrawMesh, to make ignore the scene. This is a bit risky, due to using reflection :(
BindingFlags bfs = BindingFlags.Static | BindingFlags.NonPublic;
Type[] args = new Type[]{ typeof(Camera) };
mSetCameraOnlyDrawMesh = typeof( Handles ).GetMethod( "SetCameraOnlyDrawMesh", bfs, null, args, null );
mSetCameraOnlyDrawMesh.Invoke( null, new object[]{ cam } );

The very last line above is the 140 line in SF_PreviewWindow.cs. It seems like it tries to reflect something in UnityEditor.Handles but comes up with a null? I'm pretty sure this is the cause of the issue, but don't have enough knowledge of editor scripting or reflection to fix it. Perhaps someone else can?

southrop commented 5 years ago

At no point did I tell you or anyone to migrate to the new rendering pipelines. I was just pointing out that this repository is no longer supported, and thus creating issues like this won't result in any fixes. Your easiest option is to use one of the various forks that have been updated to support 2018.3, such as roguesleipnir/ShaderForge.

FreyaHolmer commented 4 years ago

This should now be fixed! At least partially - you won't get the errors anymore, but the 3D viewport will show your scene content. It's not ideal, but, I'll hopefully fix it in the next version!