AR Design
UBC EML collab with UBC SALA - visualizing IoT data in AR
CompoundButtonSaveInterceptor.cs
Go to the documentation of this file.
1
// Copyright (c) Microsoft Corporation. All rights reserved.
2
// Licensed under the MIT License. See LICENSE in the project root for license information.
3
4
using
UnityEditor
;
5
using
UnityEngine
;
6
using
HoloToolkit
.
Unity
.
Buttons
;
7
8
public
class
CompoundButtonSaveInterceptor
:
UnityEditor
.AssetModificationProcessor
9
{
10
public
static
string
[]
OnWillSaveAssets
(
string
[] paths)
11
{
12
// Tell our mesh buttons and icons to switch over to non-instanced materials
13
// This will prevent them from saving the scene with broken material links
14
// Materials will be re-instanced immediately afterward so this should have no effect
15
16
CompoundButtonMesh
[] meshButtons = GameObject.FindObjectsOfType<
CompoundButtonMesh
>();
17
foreach
(
CompoundButtonMesh
meshButton
in
meshButtons)
18
{
19
meshButton.OnWillSaveScene();
20
}
21
22
CompoundButtonIcon
[] iconButtons = GameObject.FindObjectsOfType<
CompoundButtonIcon
>();
23
foreach
(
CompoundButtonIcon
iconButton
in
iconButtons)
24
{
25
iconButton.OnWillSaveScene();
26
}
27
28
return
paths;
29
}
30
}
HoloToolkit.Unity.Buttons.CompoundButtonMesh
Mesh button is a mesh renderer interactable with state data for button state
Definition:
CompoundButtonMesh.cs:14
UnityEditor
HoloToolkit.Unity.Buttons
Definition:
AnimatorControllerAction.cs:7
HoloToolkit
CompoundButtonSaveInterceptor
Definition:
CompoundButtonSaveInterceptor.cs:8
CompoundButtonSaveInterceptor.OnWillSaveAssets
static string [] OnWillSaveAssets(string[] paths)
Definition:
CompoundButtonSaveInterceptor.cs:10
HoloToolkit.Unity.Buttons.CompoundButtonIcon
Definition:
CompoundButtonIcon.cs:12
UnityEngine
HoloToolkit.Unity
Assets
HoloToolkit
UX
Scripts
Editor
CompoundButtonSaveInterceptor.cs
Generated by
1.8.12