Warning: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"? in /nfs/c12/h04/mnt/221819/domains/unity3dsupport.com/html/wp-content/plugins/siteorigin-panels/inc/styles-admin.php on line 390
May 2018 – State Trivia

The power of public variables

var material1 : Material; var material2 : Material; var material3 : Material; var Player : GameObject; var Level : String; public var ScaleTo:Vector3 = Vector3(1.5,1.5,1.5); private var OriginalScale:Vector3; private var MasterOrigianlScale:Vector3; function Start () { GetComponent.().material = material1; OriginalScale = transform.localScale; MasterOrigianlScale = transform.localScale; } function OnMouseEnter() { GetComponent.().material = material2; Player.GetComponent.().material = material3; GetComponent.().Play(); […]

Using a simple C# snippet to rotate GameObjects

The following snippet animates the electrons around the nucleus. using System.Collections; using System.Collections.Generic; using UnityEngine; public class rotate : MonoBehaviour {     public GameObject sphereOne;     void Update ()     {         transform.RotateAround(sphereOne.transform.position, sphereOne.transform.up, 100*Time.deltaTime);     } }