Questions tagged as 'unity3d'

1
answer

Unity does not change the scenes

In my Unity project I have these two scenes: And I had this code to change the scene with a trigger: void OnTriggerEnter2D(Collider2D other) { //DETECTA TRIGGER PARA ENTRAR A CASA if(other.gameObject.name.Equals("casa")){...
asked by 31.10.2018 / 10:04
1
answer

c # pass data from one class to another

Good! I had done an exercise where I created a button for each file that I read in an xml.In the code that I leave down in line 4 I pass the game data to the init of another class, and then in the other class I'm doing what I want with that data...
asked by 08.04.2017 / 22:42
1
answer

C # Unity, foreach of prefabs

Good morning. I have a function that reads data from an xml that is this: private string xmlPath; public XmlManager(string xmlPath) { this.xmlPath = xmlPath; } public Datos ReadXmlTest() { XmlSerializer serializer = new X...
asked by 30.03.2017 / 15:30
1
answer

Move an object with onMouseDrag in Unity?

This code in theory works to move an object as I have seen in tutorials, but I do not move the sphere and I do not know why. I've assigned the script and everything but nothing ... what's wrong? public class mouseDrag : MonoBehaviour { float...
asked by 14.03.2017 / 11:05
1
answer

Unity and C #. Change FontSize of a JSON text

Within OnGUI() I have: GUILayout.BeginArea(new Rect(75, 500, 900, 200)); Inside, I take the JSON and show its contents: GUILayout.Label(json[0][0][textInComp][0].Value, GUI.skin.textArea); And I finish: GUILayout.EndArea();...
asked by 20.10.2016 / 08:17
1
answer

Re authenticate on facebook with unity c #

The problem I have is in simple theory, but I have not found a way to solve it. I can access FB with unity, post, view and use the information I need, all that part works well, all the information I use is stored in a local file on the phone....
asked by 13.07.2016 / 23:20
1
answer

test events during scene execution

I have two scripts: life: assigned to a gameobject Player StatusController: assigned to a panel where I have two images, one for life and the other for mana The life script has an event and its delegate, so that when the character's "li...
asked by 09.06.2018 / 08:28
1
answer

Unity 3D Door System (scene change) C #

I am developing a project in Unity and I have come to a doubt. I put you in situation: There is a village with different houses, the character can access those houses through the door, approaches it, collides with a Trigger and presses a...
asked by 19.06.2018 / 11:53
0
answers

Pause when jumping from one frame to another in a video

When I jump from one frame to another, the video pauses for half a second. Is there any way to make that not happen? The following code is from Unity3D engine: if (videoPlayer[0].frame >= 400) videoPlayer[0].frame= Otro_frame; }...
asked by 11.03.2018 / 01:51
1
answer

Simple geometry problem with Unity and C # [closed]

I need to detect when a ball crosses a line (raycast + line renderer, for now) that will be between two points (like a soccer goal bow) ... but these points will move around the screen ... How can I detect that? that the ball crossed the line?...
asked by 23.01.2018 / 02:27