ReadPixels Screen is Offset
I'm using ReadPixels to capture the screen, but the texture always comes out quite a bit offset from the top. This is the code I'm using: Texture2D tex2d = new...
View ArticleAsset Importer, GUISkin Not Moved
I've released an update to an extension in the Asset Store. Within the update, a GUISkin file has been moved to a different folder; the new folder being a "Resources" folder. Importing the new update...
View ArticleReadPixels from Game View (EditorWindow)
I'm trying to save the current game view into a texture with ReadPixels. This works when the game is running with: Texture2D tex2d = new Texture2D(Screen.width,Screen.height,TextureFormat.RGB24,false);...
View ArticleIs RenderTexture Pro Only in 3.5?
I'm working on an extension that requires the use of RenderTextures. The documentation says that RenderTexture is Pro Only. I've tested the use of RenderTextures in a non-Pro installation of Unity and...
View ArticleUsing UnityEditor in runtime
Are we allowed to use the namespace UnityEditor in a runtime class? Will any of the UnityEditor methods be available to us on runtime?
View ArticleList Scene Contents
Is it possible to list a scene's contents without opening it from an editor script? In a similar way to how importing a package works, I would like to list a scene's contents before having the editor...
View ArticleGraphics.DrawTexture + GUI.color
How can we set the GUI color when using Graphics.DrawTexture? There seems to be a color parameter but it doesn't seem to be doing anything.
View ArticleManipulate Texture UVs with Shader
How can we manipulate a texture's UVs from a shader? I've taken a look at the [Shader Reference][1], but am still quite new to shaders and would like to be pointed in the right direction. Edit: Your...
View ArticleVerificationException EditorWindow.GetWindow
Hello, I'm getting the following VerificationException error: VerificationException: Error verifying MyEditorWindow:OnEnable (): Function pointer signature 'object,bool' doesn't match delegate's...
View ArticleLoad JSON Resource as TextAsset
Hello, I'm trying to load a text file that contains JSON data as a TextAsset. This works fine if the extension of .txt is used, For example myJson.txt works with: TextAsset t = (TextAsset)...
View ArticleRenderTexture OnGUI Offset
Hello, I'm working on camera transitions that involve drawing a RenderTexture OnGUI. The RenderTexture size is set to the Screen's width and height and is displayed using DrawTexture at coordinates (0,...
View ArticleShader Only Works on "Fantastic"
Hello, I have a simple shader that will mask a 2d texture, using an alpha texture, drawn OnGUI. It works fine in the editor. However, when deploying to a PC standalone or web player, the result is a...
View ArticleShader: Fill Part of Texture?
Hello, I'm working on a 2D shader that will be used in a GUI. It involves an alpha texture masking the main texture. I need to fill parts of the mask texture based on a certain property. For example,...
View ArticleFile.IO WriteAllText not working?
Hello, I have an error reported by a customer who has purchased my asset. The error is "error CS0117: `System.IO.File' does not contain a definition for `WriteAllText'" The line in question is:...
View ArticleGUILayout not working with Event.Use (Unity 4.0)
Hello, It seems that GUILayout elements will not show in an EditorWindow when Event.Use() is invoked at the end of the OnGUI method. This occurs in Unity 4.0 but was not a problem in Unity 3.5.x. A...
View ArticleRender PC Desktop to Texture
Can you think of a method that allows you to render your PC's desktop to a virtual computer screen (texture) in Unity? Is this within the realm of possibility?
View ArticleCrossFadeQueued after Reversed Animation
Hello, I am trying to crossfade to an "idle" animation after playing another animation clip in reverse. Ex. playerModel.animation["look_start"].speed = -1;...
View ArticleSecure PlayerPrefs in iOS with MD5
I have locally stored data that will be used for leaderboards and needs to be secure. I am using md5 to save a hash with the data and the hash is validated when the data is loaded. For example:...
View ArticleRig Scaling Import Issue
I'm having a problem importing a rigged model into Unity. The model does not scale correctly, as you can see here: ![alt text][1] [1]: /storage/temp/13181-issue.png The fbx file contains a rigged...
View ArticleMesh disappears iOS
I have a static environment mesh that displays fine in the editor but disappears in the iOS build. The shader used is mobile/unlit (supports Lightmaps). There is no culling mask being applied to the...
View Article