You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
688 B
28 lines
688 B
using UnityEngine; |
|
using HighlightPlus; |
|
|
|
namespace HighlightPlus.Demos { |
|
|
|
public class ManualSelectionDemo : MonoBehaviour { |
|
|
|
HighlightManager hm; |
|
|
|
public Transform objectToSelect; |
|
|
|
void Start() { |
|
hm = Misc.FindObjectOfType<HighlightManager>(); |
|
} |
|
|
|
void Update() { |
|
if (Input.GetKeyDown(KeyCode.Alpha1)) { |
|
hm.SelectObject(objectToSelect); |
|
} |
|
if (Input.GetKeyDown(KeyCode.Alpha2)) { |
|
hm.ToggleObject(objectToSelect); |
|
} |
|
if (Input.GetKeyDown(KeyCode.Alpha3)) { |
|
hm.UnselectObject(objectToSelect); |
|
} |
|
} |
|
} |
|
}
|
|
|