Questions tagged as 'unity3d'

1
answer

Unity get gameobject disabled

My player has a shield that is disabled in it, and I have a game manager that wants to take care when it can activate the shield or not when the player is instantiated in the scene the game manager does not find the component of the shield, this...
asked by 01.06.2018 / 03:55
2
answers

How to specify object in getcomponent?

How do I specify each object in getcomponent ? I did this script, but I do not know how to specify for each animator . using System.Collections; using System.Collections.Generic; using UnityEngine; public class anim2: MonoBehaviou...
asked by 21.07.2017 / 20:01
1
answer

How to program a button in the unity that after being clicked, show a text with information on the screen?

I would not want to have to create another Scene again to show the information ... I would like to show it on the same screen and without leaving it stuck. Could someone help me?     
asked by 05.07.2017 / 19:48
1
answer

Apply force by clicking and dragging unity [closed]

Good morning, I'm a beginner in Unity so sorry if I talk nonsense haha I'm developing a game where I need to put a ball in a basket, what I'm not able to do is click and drag the ball to apply the force and nor change the intensity gives stre...
asked by 05.04.2017 / 15:35
1
answer

Unity 2d - Enemy following player [closed]

Well, I'm having trouble making the enemy follow the player, I made the code below: public class folow : MonoBehaviour { public Transform target;//set target from inspector instead of looking in Update public float speed = 3f; private Transfo...
asked by 07.03.2017 / 16:43
1
answer

CS00103 The name 'flashspeed' does not exist in the current context

This error message appears, what should I do? using UnityEngine; using UnityEngine.UI; // using System.Collections; public class PlayerHealth : MonoBehaviour { public int startingHealth = 100; public int currentHealt...
asked by 02.03.2017 / 16:39
1
answer

Unity - "How to centralize and update all Game variables?"

Engine: Unity (5.4.3). Script language used: C # Scenario: The game is divided into scenes, each scene consisting of enemies and traps, each enemy composed of their weapons, and each of these elements composed of their respective var...
asked by 04.11.2016 / 12:59
1
answer

The camera does not follow the character UNITY 5

Unity Error Look rotation viewing vector is zero UnityEngine.Quaternion:LookRotation(Vector3 Full Code using UnityEngine; public class PlayerMovement : MonoBehaviour { public float speed = 6f; Vector3 movement...
asked by 23.04.2016 / 20:37
1
answer

Facebook login system SDK 7.3 with Unity 5.3

I'm implementing the Facebook SDK in my Unity-created game and I'm having a lot of problems.   I tried to implement the Facebook login system: FB.LogInWithReadPermissions(new List<string>() { "public_profile", "email", "user_friends" },...
asked by 05.01.2016 / 03:48
1
answer

Error Unity Development of an Online Project

How do I fix this error?    Assets / Online / Online.cs (139,25): error CS0246: The type or namespace name 'PlayerBehaviour' could not be found. Are you missing a using directive or an assembly reference? My script is the second way P...
asked by 13.10.2015 / 20:15