Quantcast
Channel: Answers by "brunopava"
Browsing all 64 articles
Browse latest View live
↧

Answer by brunopava

//[Command] void CreatePart() { GameObject Te = (GameObject)Instantiate(TestPart,transform.position,transform.rotation); // You had "TestPart" here. You need to put "Te" because its actualy the object...

View Article


Answer by brunopava

You need to use "GetComponent", in doing so you won't need to cast. http://docs.unity3d.com/ScriptReference/GameObject.GetComponent.html mySlider =...

View Article


Answer by brunopava

You can use Split. ex: string allCodes = "G10,M8,X5,Y5"; // this splits the string using comma as a parameter. // every index on the array will now have a code in it. // note that this method requires...

View Article

Answer by brunopava

You can use this method: http://docs.unity3d.com/ScriptReference/Collider.OnTriggerEnter.html To create a simple timer you can use: float time = 0; private void Update() { time += Time.deltaTime;...

View Article

Answer by brunopava

You can check this guy out: https://www.youtube.com/playlist?list=PLW3Zl3wyJwWOpdhYedlD-yCB7WQoHf-My His aproach is very visual and easy to understand. Also you should consider learning a programming...

View Article


Answer by brunopava

- Add them to a Panel. - Add a Content Size Filter to the Panel - Adjust the Content Size Filter to resize itself. - Add a Mask to the Panel.

View Article

Answer by brunopava

On my opnion you should begin with this aproach: (if you don't want to change scenes) Create an "arena" (where your characters will fight) Position a camera to see this arena how you want. Now the...

View Article

Answer by brunopava

I guess you are trying to access a null reference on your list. See, when you call: **ProfileData data= new ProfileData();** You create an instance of ProfileData, but the list itself has no values...

View Article


Answer by brunopava

I have a script that can be aplied to this. private float _clampingAngle = 90f; public bool isVisible = false; private Camera _mainCamera; private Transform _itSelf; private Transform _cameraTransform;...

View Article


Answer by brunopava

if (Input.GetKey(KeyCode.F) && dist > 1.5f) { //do stuff }

View Article

Answer by brunopava

https://www.assetstore.unity3d.com/en/#!/content/2449 https://www.assetstore.unity3d.com/en/#!/content/10032 These two work fine. I have tested them.

View Article

Answer by brunopava

There is two plugins that can do that on mobile. Mobile Movie Texture and Easy Movie Texture. https://www.assetstore.unity3d.com/en/#!/content/10032 https://www.assetstore.unity3d.com/en/#!/content/2449

View Article

Answer by brunopava

Edit > Snap Settings on menu.

View Article


Answer by brunopava

Screen.lockCursor = true; // disable the cursor Screen.lockCursor = false; // enable the cursor Check out this [Screen][1] class. [1]:...

View Article

Answer by brunopava

You should try to put your space ship inside a empty game object with it's Z axis facing towards were you want to go(in that case, right). Then you use iTween path on the new object. Let me know if it...

View Article


Answer by brunopava

c# // fast rotation float rotSpeed = 360f; // distance between target and the actual rotating object Vector3 D = target.position - transform.position; // calculate the Quaternion for the rotation...

View Article

Answer by brunopava

Make a script like this: function OnTriggerEnter (other : Collider) { if(other.gameObject.tag == "Player") { other.gameObject.SendMessage ("ApplyScore", incomingScoreValue);...

View Article


Answer by brunopava

// this line is wrong GameObject.Find("__GameMaster").GetComponent(Score).score)SendMessage("SetScore"), spentAmount); // not sure why are you getting the score, but this should work....

View Article

Answer by brunopava

You are using GetComponent wrong. It requires a typeof. Like this: GetComponnent().enabled = false;

View Article

Answer by brunopava

The var keyword is used on Javascript, to declare variables with C# you simply state the type of it. //Your code var cw = (GameObject)Instantiate(envCrossSectionCCW.gameObject); //My code GameObject cw...

View Article
Browsing all 64 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>