Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Join us on March 30, 2023, between 5 am & 1 pm EST, in the Performance Profiling Dev Blitz Day 2023 - Q&A forum and Discord where you can connect with our teams behind the Memory and CPU Profilers.
    Dismiss Notice

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:
    81
    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:
    2,101
    try upgrading to the latest 2022.1 version. you are still using a beta version.
     
  3. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    81
    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:
    81
    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:
    2,101
    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.
     
    DuncanGreen, l3w15911 and tonkodonis like this.
  6. blu3drag0n

    blu3drag0n

    Joined:
    Nov 9, 2018
    Posts:
    81
    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:
    4
    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!