March 2018
Beginner
274 pages
6h 1m
English
We will build an ObjectOutliner class to handle the outlining for us. Follow along as we build the pieces to turn the outline on and off as the user selects an object:
namespace Packt.ARCoreDesign{ using System.Collections; using System.Collections.Generic; using UnityEngine; public class ObjectOutliner : MonoBehaviour { public int MaterialSlot; public Material DefaultMaterial; public Material OutlineMaterial; public bool outlineOn; public void Outline() { outlineOn = !outlineOn; var renderer = GetComponent<MeshRenderer>(); Material[] mats = renderer.materials; ...Read now
Unlock full access