CustomEditor Preview Does Not Appear in Unity 2018.1

Asked 2 years ago, Updated 2 years ago, 44 views

We have created a CustomEditor Preview with reference to the following pages:
http://anchan828.github.io/editor-manual/web/customeditor.html

I have confirmed that it is displayed normally until Unity 2017.3, but when I updated it to Unity 2018.1.2f and Unity 2018.1.5f, both of them were blank on the preview screen.

How do I get Unity 2018 to display it on the preview screen as before?

unity3d

2022-09-29 21:25

1 Answers

I solved myself.
Until now, there was no problem with this code, but it seems that the specifications have changed since Unity 2018, or that the bug was drawn in Unity 2017.

The corrections in the relevant source are

previewObject=Instantiate(component.gameObject);
    previewRenderUtility.AddSingleGO(previewObject);

will be


2022-09-29 21:25

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.