Quantcast
Channel: Latest Questions by Gillissie
Browsing latest articles
Browse All 93 View Live

web player overlays HTML layers

I have a Unity web app running on a Facebook canvas. The Facebook layers for things like the notifications dropdown and request popups are covered up by the Unity player. Is there a way to change this...

View Article



how to reference uninstantiated prefab?

I have a script that gets attached to a game object through code when the time is right. The script instantiates another game object (an emitter) from a prefab. However, I can't seem to figure out the...

View Article

C# static class not in Plugins folder

I found this MD5 code somewhere around here. Why won't this work if I don't put it in the Plugins folder? With Javascript I can make classes with static functions & variables and put it anywhere I...

View Article

getting literal value for enum

In every other language that I have used with enums, the enum values are simply constants for numeric values that can be used for anything where a number can be used. However, Unity doesn't like it...

View Article

colliders and rigidbodies

Is it always necessary to have a collider AND rigidbody on an object if you simply want to know if two objects collide? I have two objects with colliders. I control the position of the objects at all...

View Article


What is timeoutDestructor?

While searching the scripting docs on the word "destructor", I came across this snippet of code:// Set the missiles timeout destructor to 5 clone.timeoutDestructor = 5;So I searched for...

View Article

Is there a way to make a class destructor in javascript?

I have classes that instantiate game objects. I want the game objects to get destroyed when the owner object is destroyed through normal means (garbage collection I suppose). This could easily be done...

View Article

disable esc to exit full screen?

I realize that the web player uses Esc as a safety mechanism for users to exit full screen. However, I want to use Esc for doing other things in my game, like canceling an action. Is it possible to...

View Article


Is there a shader to only add an outline?

The toon shaders have outlines, but also change the shading of the object. I'd like to show an outline without affecting the rest of the shading. Also if possible, only show outline around the...

View Article


Creating a GUI Button background texture

How would I go about creating a background texture that works like the default one, where it somehow looks good no matter how large you make the button?The default texture isn't listed in the texture...

View Article

particles/multiply shader not working on fbx

I started by using a primitive "Plane" as the ground. I textured it with a diffuse shader for grass, and a particles/multiply shader for random splotchiness to distract from the grass tiling. It looks...

View Article

mesh from scratch disappearing if transform out of view

I am creating a plane mesh through code using this function: https://gist.github.com/952795For some reason when the transform point of the game object moves out of camera view, the entire mesh isn't...

View Article

Is it possible to have a shader that draws various textures based on normal...

I have a subdivided mesh that I use as a terrain, and allow users to raise or lower parts of the mesh to design landscape. Right now it simply stretches the texture out with the adjusted vertices, but...

View Article


How to expose script properties in C# ?

The documentation seems to contradict.First it says that all behaviour scripts must derive from MonoBehaviour. Then it says that in order to display variables in the inspector, "you need create a class...

View Article

Can anyone explain the Character Customization example project?

The Character Customization project (http://unity3d.com/support/resources...rcustomization) somehow combines meshes into a single boned animated mesh, but unfortunately the project doesn't come with a...

View Article


AssetPostprocessor reference to asset being processed?

I wrote this class to streamline import settings on a bunch of UI textures. In addition to setting import settings, I want to create a material for each texture. This works great if I use "Reimport"...

View Article

Is there a way to react to assets being deleted?

I have a custom import script for some textures where an associated material is automatically created upon import. I would also like to automatically delete associated materials if I decided to delete...

View Article


class design preference

If you were designing a class that could be used for a few different types of objects, and not every property was used for every object type how would you do it between the two versions here? Mainly,...

View Article

GL.LINES dashed (stippled) - why?

If I only use 2 vertices for GL.LINES, I get a solid line as expected. However for some reason if I use more than 2 vertices, the line ends up looking dashed. I'm no GL expert, but a Google found...

View Article

customizing loading page

According to this documentation http://unity3d.com/support/documentation/Manual/Customizing%20the%20Unity%20Web%20Player%20loading%20screen.html you can replace the Unity logo with your own image by...

View Article

simple collision not working

I feel stupid to have to ask for help on this. I have a player object with a capsule collider (I don't want to use the character controller because I don't want gravity). I also added a RigidBody...

View Article


RenderTexture usage in PostProcessing effects

The documentation says this: "Note that while RenderTexture assets can be only power-of-two size, it is possible to create a non-power-of-two (rect) render textures from scripts. These are most often...

View Article


Japanese character support on iOS

The default Arial font displays Japanese characters. However, if I try to use an imported font, I get the warning that dynamic fonts aren't supported on this platform. Then the Japanese characters...

View Article

detecting locale on iOS

Is there any way to detect the current locale of the iOS device? It's sort of important when localizing a game. I don't see anything in the docs.

View Article

Compiling plugin for iOS - need more info.

I looked at these docs: http://unity3d.com/support/documentation/Manual/Plugins.html But they really skim over it. Exactly how do I compile an Objective-C function and get it to work in Unity? Is it...

View Article


shader diffuse color too dark

I know practically nothing about programming shaders, so I need some very simple help. This is a very basic shader for making a solid color with a specular highlight, targeted at iOS. It works fine...

View Article

OnPostprocessAllAssets is not doing anything

I have implemented this based on the information here, except converted it to C# http://unity3d.com/support/documentation/ScriptReference/AssetPostprocessor.OnPostprocessAllAssets.html However, it...

View Article

Unity services is having major issues

Not recognizing my project id. Failing authentication. "Request Failed Grizzly 2.3.30" message on web page. I can't make a build because unity can't reach the services.

View Article

How to know if UnityWebRequestAssetBundle.GetAssetBundle is using a cached...

I am loading asset bundles using UnityWebRequestAssetBundle.GetAssetBundle() per the documentation. Supposedly it automatically handles caching (I pass in a version number). However, I'm not certain...

View Article



How to rotate around an axis so that another axis always points down? (see...

I'm using LookAt() to make characters look at things (like the camera). However, the more their body is turned away from the object, the more their head tilts strangely instead of always keeping the X...

View Article
Browsing latest articles
Browse All 93 View Live


Latest Images