Search Unity

RenderTexture.Create failed: width & height must be larger than 0

Discussion in 'Editor & General Support' started by blu3drag0n, Jul 4, 2022.

  1. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    94
    No chance to find anything related to this issue, so I am posting right now.

    After I simply reboot my machine today i permanently receive this strange error spammed into my console.

    RenderTexture.Create failed: width & height must be larger than 0
    UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)



    There is no real chance for me to track it down and I cant find anything in the docs nor in the forum.
    There are several threads about "RenderTexture.Create failed: [...]" but nothing about the suffix of my error.
    I even tried some of the suggested stuff of the sub-topics, but nothing works.

    I already restarted multiple times, re-installed also, I reimported the whole project several times, I also re-imported the packages I have installed like TMP.
    Strangely this error is spammed either in Editormode and Playmode.
    I already disabled all objects, I already disabled all Editorscripts (from me) etc. to try to isolate the issue. At none level there was any change to the Error-flooding into the console.

    And then i tried hard to find anything about some random object of type "RenderTexture" that might cause the isse.
    To be said, I have nothing in place like that yet by myself. I have some plugins, but nothing special, only Tilemaps and TMP from Unity themselves anyways.

    But then with
    Code (CSharp):
    1.         UnityEngine.Object obj = GameObject.FindObjectOfType(typeof(RenderTexture), true);
    2.         Selection.activeObject = obj;
    I was able to get the evil object selected in Editor mode and Playmode.

    upload_2022-7-4_23-2-42.png

    I have no clue what to do about it.
    The InstanceID seems to be not persistent and every time i switch between Editor & Playmode the InstanceID changes, so I assume the object is generated every now and then.

    Also I tried finding any object in hierachy in scene view and in assetview that could be related to this name "Editor Atlas Monitor RT". I also tried searching only for particular terms.
    ! NOTHING !

    I rarely know what to try next, but this time i would make a simple call to a Unity bug.
    My Unity version: 2022.1.0b16.3019

    I actually regret that I tried first time other than LTS, but yeah, that hindsight it doesnt help me now, I cant really downgrade to 2021 (can I ?)

    Any ideas ?
     

    Attached Files:

  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,970
    try upgrading to the latest 2022.1 version. you are still using a beta version.
     
  3. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    94
    thanks for the hint, just did it and same issue persists
    now I am unity 2022.1.7f1
     
  4. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    94
    If I doubleclick the Error the inspector shows me such item
    upload_2022-7-5_0-16-9.png

    Sorry if exxagerating, but what the heck of a thing is this ?

    Any idea is appreciated, I am completly lost.
    It spits 30.000 Errors in a few seconds until I clear it or going higher and higher.
    I have not even a remotely close idea of what to do about it ...
     
  5. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    5,970
    Is the error message just these two lines or is there more in the details pane when you select the message in the console? If so, post the full message.

    One thing you could try (in a backup of the project) is to reset the window layouts to one of the default layouts. I can imagine the error coming from an editor window whose size somehow became 0,0.

    Speaking of which, you can also go into package manager and disable any asset store packages (one by one) that have editor windows to check if the error comes from a package.

    By re-importing the project you mean deleting the Library folder while Unity is closed? If not that‘s something you could try as well.
     
  6. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    94
    It is just the two lines, otherwise I would have reported more.

    Now I downgraded to 2021 LTS and pay the cost if something breaks by redoing it.
    The error disappeared.
    I will keep in mind to reset the layout if I gonna test it on 2022 again. It sounds reasonable as a solution.

    Thank you, I come back here if I face the issue again and/or tested some of your possible solutions.
    KR
     
  7. Nackley

    Nackley

    Joined:
    Aug 14, 2022
    Posts:
    5
    whoa. This worked for me. Thank you!
     
  8. tonkodonis

    tonkodonis

    Joined:
    Aug 21, 2022
    Posts:
    5
    worked for me ! THANK YOU
     
    l3w15911 likes this.
  9. max_unity787

    max_unity787

    Joined:
    Mar 1, 2021
    Posts:
    1
    Reseting the layout worked for me in the 2022 full release version so THANKS!
     
  10. LegalAss

    LegalAss

    Joined:
    Nov 26, 2022
    Posts:
    1
    I had the same issue and it seems that in my case error came from the Tile Palette which got stuck between layers of Unity Editor. Rearranging the layout helped!
     
  11. npc12927

    npc12927

    Joined:
    May 14, 2023
    Posts:
    1


    its so Helpfull sir, lot of thanks for you!! godbless!
     
  12. Fun_and_Games

    Fun_and_Games

    Joined:
    Mar 8, 2023
    Posts:
    3
    I tried turning debug mode on and off again. that worked for me. you can keep it on, but i prefer to turn it off afterwards since it increases performance. it also works on some other errors as well. (if you don't know how to turn it on, it's in the bottom right corner of the screen next to three other buttons)
     
    Last edited: Jun 5, 2023
  13. KillDashNine

    KillDashNine

    Joined:
    Apr 19, 2020
    Posts:
    453
    Happened to me today. Solution was to restart editor.
     
  14. procopy01

    procopy01

    Joined:
    Apr 24, 2020
    Posts:
    12
    In my case, it turned to be the switching of some mixed lights to baked, without removing Aura component.
     
  15. zintax13223

    zintax13223

    Joined:
    Jan 15, 2024
    Posts:
    1
    Thanks! Reseting the layout solved it!
     
  16. HotClaw

    HotClaw

    Joined:
    May 20, 2013
    Posts:
    3
    I got this today. I can replicate it every time by resizing my scene view really small, and switching the "subscene" by double-clicking a prefab in the hierarchy. Then, I can predictably trigger the messages by repeatedly dragging that window to tiny and bigger again.