Quantcast
Channel: Latest Questions by absameen
Browsing latest articles
Browse All 62 View Live
↧

Rotate Around Local Y Axis

How does the unity rotate tool rotate around the local y axis? It seems that if I try to adjust localEulerAngles.y programmatically, we do not get the same effect. When rotating with the local rotate...

View Article


Serialize Nested Lists

Will Unity not serialize nested lists such as: List> nList = new List>(); How can we serialize this list?

View Article


Export Scene Objects to Package

What is the best way to export a number of scene objects to a file so that they may be imported into another scene?

View Article

OpenSceneAdditive Remove Duplicates

I'm in the process of writing a script that will merge scenes with the option of removing duplicate GameObjects. The idea is to open a scene with EditorApplication.OpenSceneAdditive, and then check if...

View Article

Show Scene Hierarchy in Editor

I need to show the scene hierachy in an editor window. At the moment, I am retrieving all GameObjects with GameObjects.Find and displaying them in alphabetical order. However, this does not take...

View Article


Programmatically Undo GameObject Deletion

I'm working on an extension and I need to give the user a popup message (DisplayDialog) offering to undo the deletion of a GameObject if it is needed by the extension. What I'm doing right now is...

View Article

Asset Multiple License

I've been asked by a potential customer if they can use the same Asset Store account and download my Asset for different licenses of Unity on different computers. What is Unity's stance on this?

View Article

Get Script Path

I'm working on an extension where resources are loaded from and exported to a fixed directory. Problems occur if the user puts the extension in a subfolder. How can we get the path of a script? Or is...

View Article


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 Article


Asset 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 Article

ReadPixels 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 Article

Is 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 Article

Using 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 Article


List 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 Article

Graphics.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 Article


Manipulate 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 Article

VerificationException 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 Article


Load 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 Article

RenderTexture 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 Article

Shader 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 Article

Shader: 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 Article


File.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 Article


GUILayout 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 Article

Render 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 Article

CrossFadeQueued 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 Article


Secure 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 Article

Rig 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 Article

Mesh 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

What is the best way to fetch a Sprite?

I have an inventory system that has a lot of items. Each item has a sprite that needs to be fetched. As far as performance and memory usage are concerned, is it better to use Resources.Load every time...

View Article



UI Image Offset/Scale Tiled Texture

When working with a UI Image on a Canvas, how do you offset the tiled texture and scale it?

View Article
Browsing latest articles
Browse All 62 View Live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>