Adventure Creator Wikia
Explore
Main Page
Discuss
All Pages
Community
Interactive Maps
Recent Blog Posts
Popular pages
Most visited articles
Custom Action - Variable: MultiBoolCheck
General
Scrolling text and Scrolling text audio.
Cancel Interaction Menus
Adding image effects
Custom trigger (triggers one actionlist when entering and another when exiting)
Randomize speech audio (Random Syllables)
Use items on an AC Character
Running Animations when game is paused
Integrations
CNControls Integration (Virtual Joystick)
Rewired integration
Unity analytics Integration (AC Action)
FinalIK Interactions Integration (AC Action)
Rogo Lipsync (No audio) 01 - Play Action
Rogo Lipsync (No audio) 02 - Stop Action
Rogo Lipsync (No audio) 03 - Set Emotion Action
FANDOM
Fan Central
BETA
Games
Anime
Movies
TV
Video
Wikis
Explore Wikis
Community Central
Start a Wiki
Don't have an account?
Register
Sign In
Sign In
Register
Adventure Creator Wikia
192
pages
Explore
Main Page
Discuss
All Pages
Community
Interactive Maps
Recent Blog Posts
Popular pages
Most visited articles
Custom Action - Variable: MultiBoolCheck
General
Scrolling text and Scrolling text audio.
Cancel Interaction Menus
Adding image effects
Custom trigger (triggers one actionlist when entering and another when exiting)
Randomize speech audio (Random Syllables)
Use items on an AC Character
Running Animations when game is paused
Integrations
CNControls Integration (Virtual Joystick)
Rewired integration
Unity analytics Integration (AC Action)
FinalIK Interactions Integration (AC Action)
Rogo Lipsync (No audio) 01 - Play Action
Rogo Lipsync (No audio) 02 - Stop Action
Rogo Lipsync (No audio) 03 - Set Emotion Action
Editing
Easy Performant Outline integration
Back to page
Edit
Edit source
View history
Talk (0)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
The built-in method of highlighting Hotspots when selecting them is to brighten their materials. This script provides a way to instead display an outline effect around them - through use of the [https://assetstore.unity.com/packages/vfx/shaders/fullscreen-camera-effects/easy-performant-outline-2d-3d-srp-lwrp-urp-default-renderer-157187 Easy Performant Outline] asset. This asset provides outline effects in 2D, 3D and the render pipeliens. To use it: # Import Easy Performant Outline into your AC project # Attach the Outliner component to your AC MainCamera # Create a new C# script file named EasyOutline.cs, and paste in the code below # To any Hotspot you want to affect, attach the Easy Outline component to it. The Hotspot's Highlight field, if set, can be removed. # An Outlinable component will be added automatically. Configure its Inspector so that it affects the correct meshes. # The script will, by default, only show the front outline in a white colour. The script can be editied to change the style of outline if desired. EasyOutline.cs: using UnityEngine;<br> using System.Collections;<br> using EPOOutline;<br> using AC;<br> <br> <br> [RequireComponent (typeof (Outlinable))]<br> public class EasyOutline : MonoBehaviour<br> {<br> <br> #region Variables<br> <br> private Hotspot hotspot = null;<br> private Outlinable outlinable = null;<br> private const float speed = 5f;<br> <br> #endregion<br> <br> <br> #region UnityStandards<br> <br> private void Awake ()<br> {<br> hotspot = GetComponent<Hotspot>();<br> outlinable = GetComponent<Outlinable>();<br> <br> outlinable.RenderStyle = RenderStyle.FrontBack;<br> outlinable.enabled = false;<br> outlinable.BackParameters.Enabled = false;<br> outlinable.FrontParameters.Color = Color.white;<br> outlinable.FrontParameters.DilateShift = 0f;<br> }<br> <br> <br> private void OnEnable ()<br> {<br> EventManager.OnHotspotSelect += OnHotspotSelect;<br> EventManager.OnHotspotDeselect += OnHotspotDeselect;<br> }<br> <br> <br> private void OnDisable ()<br> {<br> EventManager.OnHotspotSelect -= OnHotspotSelect;<br> EventManager.OnHotspotDeselect -= OnHotspotDeselect;<br> }<br> <br> #endregion<br> <br> <br> #region PrivateFunctions<br> <br> private void OnHotspotSelect (Hotspot hotspot)<br> {<br> if (this.hotspot == hotspot)<br> {<br> StopAllCoroutines ();<br> StartCoroutine (TransitionOn ());<br> }<br> }<br> <br> <br> private void OnHotspotDeselect (Hotspot hotspot)<br> {<br> if (this.hotspot == hotspot)<br> {<br> StopAllCoroutines ();<br> StartCoroutine (TransitionOff ());<br> }<br> }<br> <br> <br> private IEnumerator TransitionOn ()<br> {<br> outlinable.enabled = true;<br> <br> while (outlinable.FrontParameters.DilateShift < 1f)<br> {<br> float newShift = outlinable.FrontParameters.DilateShift + (speed * Time.deltaTime);<br> newShift = Mathf.Clamp01 (newShift);<br> outlinable.FrontParameters.DilateShift = newShift;<br> yield return new WaitForEndOfFrame ();<br> }<br> }<br> <br> <br> private IEnumerator TransitionOff ()<br> {<br> while (outlinable.FrontParameters.DilateShift > 0f)<br> {<br> float newShift = outlinable.FrontParameters.DilateShift - (speed * Time.deltaTime);<br> newShift = Mathf.Clamp01 (newShift);<br> outlinable.FrontParameters.DilateShift = newShift;<br> yield return new WaitForEndOfFrame ();<br> }<br> <br> outlinable.enabled = false;<br> }<br> <br> #endregion<br> <br> } [[Category:Integrations]]
Summary:
Please note that all contributions to the Adventure Creator Wikia are considered to be released under the CC-BY-SA
Cancel
Editing help
(opens in new window)
Follow on IG
TikTok
Join Fan Lab