Tanoda
pb_EditorComponentAttribute.cs
Go to the documentation of this file.
1
using
UnityEngine
;
2
using
System;
3
4
namespace
GILES
5
{
12
[AttributeUsage(AttributeTargets.Class, AllowMultiple =
true
, Inherited =
true
)]
13
public
class
pb_EditorComponentAttribute
: Attribute
14
{
15
public
static
void
StripEditorComponents
(GameObject target)
16
{
17
foreach
(
Component
component
in
target.GetComponents<
Component
>())
18
{
19
if
(component !=
null
&& Attribute.GetCustomAttribute(component.GetType(), typeof(
pb_EditorComponentAttribute
)) !=
null
)
20
pb_ObjectUtility.Destroy(component);
21
}
22
}
23
}
24
}
Component
UnityEngine.Component Component
Definition:
Inspector.InspectorTab.cs:10
GILES.pb_EditorComponentAttribute
Definition:
pb_EditorComponentAttribute.cs:14
GILES.pb_EditorComponentAttribute.StripEditorComponents
static void StripEditorComponents(GameObject target)
Definition:
pb_EditorComponentAttribute.cs:15
GILES
Definition:
pb_CollectionUtil.cs:4
UnityEngine
Definition:
HSVPicker/UtilityScripts/BoxSlider.cs:7
Source
Assets
GILES
Code
Classes
pb_EditorComponentAttribute.cs
Generated by
1.9.3