Quantcast
Channel: Latest Questions by unityplease
Browsing latest articles
Browse All 69 View Live

Cannot use GetComponent in Mouselook

I'm trying to set the mouse sensitivity when my character controller starts. I have a slider that sets the value and stores this in a public variable in a component called _GlobalScripts attached to an...

View Article



Unity UI (4.6.1) placeholder graphic for input field c#

I am using the following code to dynamically create a canvas with an input field in it at runtime. The issue is that the placeholder requires a graphic class. This can be created in the unity GUI by...

View Article

How to create a 4.6 UI button NOT from prefab NOT in unity editor only from C#

I've read a lot of questions and answers and watched endless youtube videos but I can't find the answer to this anywhere. Frequently people suggest instatiating a prefab button or worse ignore the...

View Article

UI 4.6 input field how do I use the .onendedit?

I would like my input field to stop accepting further edits after the user has pressed return or mouse clicked away from the input field. I assume I have to add a function to the .onendedit property...

View Article

Deactivate input field, NOT set interactable to false

How do I ensure my inputfield in UI 4.6 stops picking up keyboard input after I have submitted using enter or clicked on another object? Setting intractable to false makes the input field no longer...

View Article


4.6 inputfield strange behaviour after submit

I created three UI inputfields to test an issue I'm having after pressing enter. Added by GameObject -> UI -> Inputfield I placed them in their own positions on the screen in screen space -...

View Article

Update slider every frame with value from another script c#

I have a script that I attach to a gameobject that contains its stats: Things like: public class Stats : MonoBehaviour { // attributes public float health; public float intelligence; public string...

View Article

Create a slider which refers to a value in another script

I've got no answers to my other question here: http://answers.unity3d.com/questions/878456/update-slider-every-frame-with-value-from-another.html So I thought I'd re-write the problem with a bit more...

View Article


Easy way to change bool to trigger (Animator, Mechanim)

I created an extensive animation trigger web for a character involving moving around but also climbing, sitting, rolling etc. I originally made it using bool's to trigger the animations and then...

View Article


Get a scrollRect to begin with the top of content aligned to top of...

I created a scrollRect for a menu full of buttons. The number of buttons dynamically changes based on which one is pressed. There could be as few as 3 buttons or as many at 20. When there are a greater...

View Article

UI 4.6 add pointer enter event to button, c# (Not using Editor)

How do I add an event listener to a button created in code for mouse over events etc. I have previously added onclick events using animationButton.onClick.AddListener(delegate {buttonClicked();});...

View Article

Conforming Clothes, fitting on fbx skeleton to another

I have a model I imported from DAZ studio that I want to add a series of clothing sets to. I 'could' export the model with all the clothing meshes attached and then hide the meshes of the clothes I...

View Article

2D slider (UI 4.6) for color picker (world space)

Hi, I was trying to use the following color picker: http://forum.unity3d.com/threads/color-picker.267043/ However when you change it to work on a world space canvas and change the scale it ceases to...

View Article


Copy/Paste Mecanim Transitions

I created a complex state machine that has several transitions from an idle state: Idle -> walk Idle -> jump Idle -> sit Idle -> crouch Idle -> lie down (many more) I have since realized...

View Article

Best way to save and load all objects and their parameters in a scene.

I'm trying to read up on serializable. But I was wondering if unity has a simple way to save every gameobject/ including all those instantiated and their parameters/scripts with references to a file....

View Article


How much do blendshapes affect game performance

I have a character with a few hundred morphs (blendshapes). This character also has clothes that contain a similar number of morphs to ensure they fit. If I export the .fbx model without any morphs...

View Article

Rotate Object on single Axis (Slider UI)

I want to use two sliders to rotate an object in view in x and y. The following code 'sort-of' works but occasionally one of the sliders causes the object to counter rotate and 'spazz' out. using...

View Article


Importing animations from iclone are wrong scale for model

I have a model in unity that I imported into iClone5 to make some additional animations. Once I made the animations I then tried to import them back into unity and although all the rotations are...

View Article

Does Animator.SetLookAtPosition respect muscle limits its doens't appear to.

My humanoid avatar has lots of nice muscle limits that prevent the character head from spinning around like in the film the exorcist. However, when I use the Animator.SetLookAtPosition(Vector3...

View Article

How do I get the current volume level (amplitude) of playing audio (not the...

How do I get the current volume level (amplitude) of playing audio (not the set volume but how loud it is)? There doesn't seem to be an obvious function to get this value. I really just want a simple...

View Article

Save a game scene to file at runtime with many dynamically instanced...

I've created an RPG with lots of dynamically instanced character game objects in, each with randomly generated names and textures, they even have dynamically generated sprite icons rendered from a...

View Article


Animating Projector Material

I am using a projector to draw circles under my units when they are selected as in this great tutorial: http://hyunkell.com/blog/rts-style-unit-selection-in-unity-5/ This works great but I tend to like...

View Article


Is there a rigidbody character controller 3rd person that can handel stairs...

I need a rigidbody script with a capsule collider attached that is capable of steping up medium sized stairs (for 3rd person characters driven by AI pathfinding). First (PLEASE READ THIS BIT), 1.) I DO...

View Article
Browsing latest articles
Browse All 69 View Live




Latest Images