Resource ID out of range in GetResource: 1048576 (max is 1048575)
SAMYTHEBIGJUICY opened this issue ยท 11 comments
I'm 100% sure that this package is the cause of the issue in the title as it stopped when I removed the UI particle system. Unfortunately unity's error messaging here gives almost nothing to go on.
I would like to know more about this issue.
Tell me about your develop/build environment.
- version [e.g. 3.3.10]
- Platform: [e.g. Editor(Windows/Mac), Standalone(Windows/Mac), iOS, Android, WebGL]
- Unity version: [e.g. 2022.2.0f1]
- Build options: [e.g. IL2CPP, .Net 4.x, URP/HDRP]
Heya sorry I do really love this git and I thank you for sharing it but yes this almost impossible to get info on error seems related to this asset being in my scene.
version [4.2.1]
Platform: [it's happening in my editor after I leave it running for about 45mins - I'm on windows]
Unity version: [2022.3.22f1]
Build options: [built in editor]
Doing a bit more digging with the memory profiler... will close this issue until I can categorically say this is from this asset. Sorry mob, don't want to falsely accuse.
I figured this out.. it is due to this asset for certain and I know why now. So I have some particle system under a new PB UI element. But I keep it disabled. Here you can see that after some time no camera or UI auto generated particle elements exist.
When I reactive this object the camera comes back but the settings are Clear Flags: "skybox", culling mask "Everything"
These settings are what generate the error. Can't the new camera be instantiated without these settings - clear flags set to Depth Only and Culling mask set to Nothing? Also why does the camera get destroyed after some time if the object is disabled? This is definitely the issue.
hehe I added this to the GetBakeCamera() method:
// Set the camera properties
_orthoCamera.clearFlags = CameraClearFlags.Depth;
_orthoCamera.cullingMask = 0; // Nothing
_orthoCamera.allowHDR = false;
_orthoCamera.allowMSAA = false;
_orthoCamera.renderingPath = RenderingPath.Forward;
++ _orthoCamera.useOcclusionCulling = false; // Disable occlusion culling
@SAMYTHEBIGJUICY
Thanks for your great cooperation! ๐
Your excellent research will fix a major glitch!
If you don't mind, I would like to add you as a contributor.
May I treat you as an AUTHOR when I commit these changes?
(or create a new pull request to develop
branch)
Edit: Thanks for sponsoring me!
ohh that's so nice of you of course! thank you! Perhaps my scenario is not common but with a large game scene with the second camera this definitely shows this unity leak more easily. I worked through the issue with some helpful people in this thread: https://forum.unity.com/threads/resource-id-out-of-range-in-getresource-1048576-max-is-1048575-on-linux.993201/#post-9875301
Anyway two cameras with an "Everything" culling mask is definitely the culprit, and if we don't need it better to set it to Nothing. I switched everything else off just in case as above.
Upgraded my sponsorship so you can have whipped cream and coffee from me hehe.
๐ This issue has been resolved in version 4.6.8 ๐
The release is available on GitHub release
Your semantic-release bot ๐ฆ๐