How do you find out what scripts are making your compile time slow?
If your scripts are still slow even after compiling separately via asmdef files, then the problem is with the domain reload, per here:...
View ArticleHow to use a non-screen-sized RenderTexture?
It is obviously quite trivial to _create_ a non-screen-sized RenderTexture in unity pro. However, the problem that I have is that when I render to it using either Graphics.DrawTexture or...
View ArticleBest way to do simple per-pixel changes in a shader?
I'm looking for the solution that runs the fastest and that is the most compatible (naturally). It seems like this ought to be easy, but the documentation on Unity shaders seems to be fairly lacking...
View ArticleHow to set up additive blending on a surface shader?
So, in a normal shader I have the line: Blend SrcAlpha One And that gives me additive blending of the sort I want. It works with transparency, and so on. However, when I use a surface shader this line...
View ArticleHow to stop sound from skipping during GC collection?
I've seen this question, of course. Granted, you want the GC to run as infrequently as possible. But, I have a very large game, and in mine it often runs about every 8 seconds. This is most troubling...
View ArticleIs it possible to upgrade the included version of Mono manually?
I know that Unity 3 is now running Mono 2.6, and that's wonderful -- it's such a huge performance and functionality increase from the older versions of Unity. However, the garbage collector still...
View ArticleFailed to get cursor position: Access is denied.
Every so often, the error "Failed to get cursor position: Access is denied." crops up from our game built on Unity 3. We never had this on Unity 2.61 on our other game, but it's extremely sporadic even...
View ArticleHow to properly set up quad positions for 2d with an orthographic camera?
For once, a brief question, as a corollary to my longer one here:http://answers.unity3d.com/questions/20459/how-to-retain-full-quality-on-a-rotated-textured-quadBasically, I'm still seeing quality drop...
View ArticleIs it possible to get the atlas for a font texture?
Using the PackTextures method returns an array of indexes of all the different textures in a given texture atlas, apparently. That's hugely useful, and I assume that with the font textures Unity is...
View ArticleHow to retain full quality on a rotated textured quad?
So, I'm rendering a textured quad via Graphics.DrawMesh, on an orthographic camera, for windows/mac standalone, in the latest unity 3 beta. All is well when there are no rotations, I have absolutely...
View ArticleIs there a way to force the unity player to minimize?
Such as, for when I want to launch an external web page based on users having clicked some button, and the game should be temporarily minimized until the user wanting to come back to the application?
View ArticleDebug Symbols without Development Build?
So, when I do a Development build of a game for the Windows platform, it generates a 36mb pdb file with a date of 11/30/2009. This is odd, because my actual C# dll itself is only 876kb. So I'd expect...
View ArticleGlobal Error Logging and Overflow Checking?
So, I'm migrating projects from SlimDX and .NET 3.5, and there are two things that were insanely helpful on that side that I can't seem to find via a search of Answers, the Forum, or the Unity script...
View ArticleWorkaround for the setresolution bug in unity 2.61 on the Mac?
For background, please see this post on the unity forums. Basically, when you call SetResolution on a Mac, it creates a new window, which makes the SetResolution pretty much completely ineffective on...
View ArticleHow to adjust the compression of audio loaded through WWW?
I am looking to have control over what sort of compression an audio file is loaded at (from WWW), and whether it is imported as 3D sound, mono, etc. Basically, the stuff that can be done through...
View ArticleWhat is the proper way to copy an audio clip?
I've got my audio clips being dynamically loaded by WWW, and I have pre-set an audio source on an invisible gameobject that sits right by the main camera. As I load new audio clips, I simply make a...
View ArticleIs there a way to set the position of a standalone unity window?
I run a dual monitor setup (Win7), and normally when I open an application it will open in the correct place. With unity games that I create, they open directly in the middle of the two monitors, and I...
View ArticleIs there a way to measure the pixel with/height of a string with a given font?
I see the GUI Layout stuff for automatically laying out UIs in certain ways. And that is pretty cool overall. However, it is also really helpful to be able to precisely center various arbitrary strings...
View ArticleHow to set up a clipping area for some but not all objects?
I'm using Sprite Manager 2 to create a puzzle game using Unity. The background images fill the entire screen, but the game board / play area fills only a part of the screen. When sprites fall into or...
View ArticleBest way to set up a predictable, scalable viewport?
This one is more challenging, I think. The Setup So FarBasically what I am doing is setting up a 2D game with textured planes. The camera is orthographic, and that's no problem. The main thing is that,...
View Article