Tanoda
UndoSelection.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
System.Collections;
3
using
System.Linq;
4
5
namespace
GILES
6
{
10
public
class
UndoSelection
:
IUndo
11
{
12
public
UndoSelection
() {}
13
14
public
Hashtable
RecordState
()
15
{
16
Hashtable hash =
new
Hashtable();
17
int
n = 0;
18
19
foreach
(GameObject go
in
pb_Selection
.
gameObjects
)
20
hash.Add(n++, go);
21
22
return
hash;
23
}
24
25
public
void
ApplyState
(Hashtable hash)
26
{
27
pb_Selection
.
SetSelection
(hash.Values.Cast<GameObject>().ToList());
28
}
29
30
public
void
OnExitScope
() {}
31
}
32
}
GILES.UndoSelection
Definition:
UndoSelection.cs:11
GILES.UndoSelection.OnExitScope
void OnExitScope()
Definition:
UndoSelection.cs:30
GILES.UndoSelection.UndoSelection
UndoSelection()
Definition:
UndoSelection.cs:12
GILES.UndoSelection.ApplyState
void ApplyState(Hashtable hash)
Definition:
UndoSelection.cs:25
GILES.UndoSelection.RecordState
Hashtable RecordState()
Definition:
UndoSelection.cs:14
GILES.pb_Selection
Definition:
pb_Selection.cs:13
GILES.pb_Selection.gameObjects
static List< GameObject > gameObjects
A list of the currently selected GameObjects.
Definition:
pb_Selection.cs:56
GILES.pb_Selection.SetSelection
static void SetSelection(IEnumerable< GameObject > selection)
Definition:
pb_Selection.cs:92
GILES.IUndo
Definition:
IUndo.cs:10
GILES
Definition:
pb_CollectionUtil.cs:4
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
GILES
Code
Classes
Undo
UndoSelection.cs
Generated by
1.9.3