Skip to main content
13 votes

A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details

Unity 2020+, in it's infinite wisdom, removed the ability for you to easily find the cause for this message. They provided a workaround, but as you will see following these steps, it is extremely ...
Dr-Bracket's user avatar
9 votes
Accepted

Mute sound in editor in Unity

In the Scene view, you will find a little toggle, near the 2D toggle, at the right of the lightning toggle (with a little sun ...
Hellium's user avatar
  • 2,949
5 votes
Accepted

How to get the source code for a game?

Getting access to a game's sourcecode can be anything between trivial to impossible. Factors which decide that are: What technology was used to create the game? Decompiling executables to readable ...
Philipp's user avatar
  • 123k
5 votes

remaking Pong in Godot but the opponent AI cannot locate the ball's coordinate correctly

In the Godot editor, I made the silly mistake of placing the Sprite and CollsionShape nodes far away from the (0,0) origin point....
buzzbuzz20xx's user avatar
4 votes

Debugging an AMD GPU specific problem without an AMD GPU

No. You will need to find a computer with a matching GPU to test. You can sometimes get previous-generation graphic cards for cheap (that often still exhibit the same problem) if you ask small ...
Stephane Hockenhull's user avatar
4 votes
Accepted

Why does the Debug.DrawRay return these weird lines

You're drawing Rays, not Lines. This means that the second parameter is a direction not a point in space. https://docs.unity3d.com/ScriptReference/Debug.DrawRay.html Draws a line from ...
Draco18s no longer trusts SE's user avatar
4 votes
Accepted

Are there conventions on what exactly to log in a game?

Logs serve a purpose, which is to help the developers detect, diagnose, isolate, and fix problems. When everything is running perfectly, you're probably not even reading the log. So the question of ...
DMGregory's user avatar
  • 140k
4 votes
Accepted

Disable all Player input in Godot 3?

Unfortunately, Godot 3 doesn't have an option to disable input globally. You can stop process functions like _input, ...
Bohdan's user avatar
  • 56
3 votes

Unity get more than 2 lines of log height

In the more current versions of Unity it is now possible to change the number of lines shown for messages in the Console. You can do so from the context menu of the Console window under the menu item ...
Sisus's user avatar
  • 131
3 votes
Accepted

is there any method to simply ignore some files in unity build?

You can rename the folders to one of the Unity's 'Special Folder Names' and they will be ignored: If you're on Windows, setting the folders to 'Hidden' would probably be the easiest as it likely won'...
JeffUK's user avatar
  • 220
3 votes
Accepted

Unity get component throwing NullReferenceException only in standalone build

I found the problem. It was all because of a stupid little workaround I was making. For some context, I was having problems with the new prefab workflow resetting scene references in all my levels. I ...
mr-matt's user avatar
  • 2,779
3 votes
Accepted

Set-up Android SDK path to make Android remote work in Unity

I had the same issue, I needed to manually specify the Android SDK Tools (second checkbox). My Path is: E:\Program Files\Unity\2019.1.0f2\Editor\Data\PlaybackEngines\AndroidPlayer\SDK Once I changed ...
betrice mpalanzi's user avatar
3 votes
Accepted

Unity build does not launch and leaves no logs/errors

It took me 3 months on and off working on this issue, but I have figured it out. The issue lies with OpenVR/SteamVR. The head tracker of Steam has 2 camera's; head and eyes. This is where the ...
ploopploop's user avatar
3 votes
Accepted

How to inspect child nodes in IDE debugger?

On the debugger panel you will see the members variables of the current class/script and the local variables of the current function. The node you want is neither. Thus a solution is to store it in a ...
Theraot's user avatar
  • 28.2k
2 votes
Accepted

How to know if these profiler values are good or bad?

There are no definitive "bad" or "good" value, but in general fewer calls are better since you spend less time doing what you're doing (e.g. drawing to the screen). The only way to know if your ...
Charanor's user avatar
  • 8,504
2 votes
Accepted

Find an infinite loop in a very big project in Unity

There's a paid ($15) asset called Panic Button that can help you track this down. You import it into your project, then run. Once Unity locks up in an infinite loop, hit ...
DMGregory's user avatar
  • 140k
2 votes

Phantom objects in ray tracing

The issue was not testing that the intersection needs to happen between the object and the light position. i.e I was raytracing past the light. i.e the check: ...
Makogan's user avatar
  • 270
2 votes
Accepted

What is wrong with this particular code?

You're cutting off the branch on which you're standing. You're changing the size of the container over which you're iterating. Even if you replace the item at index with the last one, you'll be ...
Vaillancourt's user avatar
  • 16.4k
2 votes

What is wrong with this particular code?

I cannot guess what language do you use so I answer about generic c-like language. Also since you didn't write explicitly what's wrong I can't be sure what's wrong so I will guess. Comparison is <...
trollingchar's user avatar
2 votes

How to get error line when debugging APK from Logcat

It looks like you’re using IL2CPP. If it’s possible, you might want to try targeting Mono instead, at least temporarily, which will do a better job of showing line numbers. Also, you can still run a ...
Ed Marty's user avatar
  • 5,259
2 votes
Accepted

Null Reference Exception error occurs when trying to override AndroidManifest file in unity?

While the NullReferenceException is technically a bug that Unity should protect against and present something nicer to the user, your manifest is not complete. The main thing it’s complaining about is ...
Ed Marty's user avatar
  • 5,259
2 votes
Accepted

Problem with Rotation clamping in Unity

As you've found, clamping an angle can be surprisingly tricky. To illustrate your particular problem, here's a couple of crappy diagrams: This is the output from ...
Chaosed0's user avatar
  • 773
2 votes

How do I debug OpenGL apps written in python?

It's hard to tell without knowing more about the python code you are trying to debug and with what library. All the tools you listed will be able to capture OpenGL calls in python the same way it ...
bwrsandman's user avatar
2 votes
Accepted

How can I debug a GameObject's rotation?

After a bunch of poking around, I was finally able to get it to stop by disabling the NavMeshAgent on the dragon, which was used to make it take a running start ...
Mason Wheeler's user avatar
2 votes

A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details

How does one enable the type of full stack trace this error requires to decipher where things went wrong? Jobs > Leak Detection > Full Stack Traces When you do this, instead of getting "...
Chuck's user avatar
  • 249
2 votes

A Native Collection has not been disposed, resulting in a memory leak. Enable Full StackTraces to get more details

in the 2022 version it's moved to the Preferences/Jobs tab
user2695351's user avatar
2 votes
Accepted

How to draw unity gizmos with new input system?

As I explained in my answer to your previous question, you generally should try to avoid thinking of input in terms of keypresses and more in terms of semantic actions. But in this particular case you ...
Philipp's user avatar
  • 123k
2 votes
Accepted

How to check which code has destroyed or disabled a GameObject?

There is no native way to do this. What you can do instead is create some extension methods something like this: ...
DMGregory's user avatar
  • 140k

Only top scored, non community-wiki answers of a minimum length are eligible