Questions tagged as 'unity-5'

0
answers

How to load 60 remote images in unity 5?

I'm trying to load 60 remote images from a JSON file, such as textures of a prefab , into three steps of 20 images. However, I can only load 15. My code below. public IEnumerator SetGallery (List<string> Thumbnails,GameObject[]...
asked by 17.02.2016 / 14:32
0
answers

ArgumentExcept Unity5 Error input axis horizontal is not setup

I'm trying to follow the "Nightmare " tutorial of the channel by playing nils , my script does not show any error, but my character does not move and Unity 5 shows this error related to the horizontal axis. I checked the Nils video and...
asked by 15.01.2016 / 21:45
1
answer

Error Can not implicitly convert type

I'm having an error    CS0029, Can not implicitly convert type int' to UnityEngine.UI.Slider ' How can I resolve it? First Code: using System.Collections; using System.Collections.Generic; using UnityEngine; public class Playe...
asked by 15.08.2017 / 20:19
2
answers

PlayerPrefs in Unity with Boolean variable?

The PlayerPrefs It has something similar or it can even use boolean variable. example: PlayerPrefs.GetInt() // e para inteiros     
asked by 01.02.2016 / 16:44
1
answer

Change sprite image when button is clicked on unity

I need a button to click on the image (a shrub) to change (for a cow in front of the shrub). public class mudaSprite : MonoBehaviour { public InputField dgt; public Text txt; public Sprite arbusto; SpriteRenderer spriteRenderer = GetComponent&...
asked by 06.11.2017 / 20:20
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

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

Static method does not have access to class variable

Hello, I have the following problem:    I have a static method that uses a variable of its class, but Unity gives me the following error:    \ Assets \ Scripts \ GameControl.cs (3.3):   Error CS0120: An Object Reference   is required for the...
asked by 24.01.2017 / 02:24
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
3
answers

Diagonal movement unity 5

I'm a beginner in unity 5, I'm trying to create a 2d game, where I want to put diagonal moves after collisions, currently getting my object after collision is thrown up, but I can not make a diagonal move in any way, my matrix has (0,6) and (0,6...
asked by 03.04.2016 / 19:35