BowieCode
BowieCode copied to clipboard
Personal Code/Snippet Library for Unity 3D
BowieCode
Personal Code, Snippet & Reference Library for Unity 3D
Features
Components
-
BindToCamera
will bind it's transform to parent's camera's near or far. Handy for keeping thing to the front or the back of a camera. -
CameraFrustumGizmo
always shows the camera's frustum in the scene view. Even when the camera is not selected. -
CameraFader
fades the camera to a texture. It includes a inspector button to generate a solid color texture. -
DefaultInstance
Gets/sets a single staticDefault
instance. Rather than have singletons, instances can utilize this generic container. For exampleDefaultInstance<MyClass>.Set( this )
andMyClass instance = DefaultInstance<MyClass>.Get()
. -
DestroyAllChildren
destroys the gameobject's children. Useful for dynamic content. Can be undone when in editor mode. -
DistributeChildren
distributes it's children between two points. The two points can be manipulated in the scene view. -
DropdownCameraSelector
binds a list of cameras to a UI.Dropdown. -
GridRepeater
clones prefabs into a grid. -
InstantiateAtTag
creates instances of a prefab in the scene at the position of game objects with a certain tag. When used in editor it can be undone. Instances can be parented with the game object at the tag, a container or the root of the scene. -
Motion
applies trig based motions to selectable variables of the transform component. -
MotionCloner
applies a master transforms position, rotation and scale to components transform. Provides options for using local or world space, and retaining offsets. -
MouseHider
hides the mouse after a set number of seconds. -
PivotGizmo3D
draws customisable axises like the move tool when the object is not selected. -
SceneRecorder
frame capture and video creation on OSX using ffmpeg installed by Homebrew. -
Singleton
inherit from to make a singleton. SeeDefaultInstance
for a better system. -
Spawner
instantiates prefabs in a random location within a predefined shape. It can set to do this every frame and spawn multiples. -
TextGizo
always displays text in the scene view
Managers
Managers use the BowieCode.DefaultInstance<T>
system.
-
DebugNotificationManager
displays short notification labels with a severity level of either info, warning or error. They are displayed indefinitely or for a set timespan, and can be updated once displayed. -
AppManager
includes:- hides the mouse if none are detected or after a set period of time,
- adds a checkbox to run application in the background.
Attributes
-
SortingLayerAttribute
andSortingLayerDrawer
provides sorting layer selection for anint
. -
TagAttribute
andTagDrawer
provides range tag selection for astring
. See: TagAttributeExample.. -
LayerAttribute
andLayerDrawer
provides layer selection for anint
. -
MinMaxSliderAttribute
andMinMaxSliderDrawer
provides range sliders forVector2
. See: MinMaxSliderExample. -
InspectorButtonAttribute
andInspectorButtonAttribute
creates a button in the editor forInspectorButton
. See: InspectorButtonExample.
Datatypes
-
Cycle
wraps aEnumerable
into a container with aNext
method. -
InspectorButton
creates a button in the inspector when paired with anInspectorButtonAttribute
. See: InspectorButtonExample. -
-
ParentingMode
helps define where instanced GameObject should be placed. -
ShapedRange
evaluates to a constant value, a value between two numbers or a value from an Animation curve. These options can be selected in the editor. It's inspired by Unity's particle system.
Utils
-
BitmaskHelper
providesIsSet
,Set
,Unset
for enums which use the[Flags]
attribute. -
BowieMath
includes:-
CompareVectors
compares if Vector are close to equal, -
MapIntervalF
maps an input float from one range to another, -
SinF
is a sine wave generator with an amplitude, and frequency defined bycyclesPerSecond
.
-
-
BowieTime
fractional day & time and format helpers. -
BowieExtensions
containsForEachWithIndex
for collection enumeration. - Editor Only:
-
ReorderableListUtil
wrapper toCreate
andDraw
a reorderable list with the correct spacing. See example for usage. See: ReorderableListExample & ReorderableListExampleEditor. -
Prefabs
enables a menu items to Apply selected prefabs.
-