Click or drag to resize

WeatherMakerLightningBoltPrefabScript Class

Lightning bolt prefab script
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          DigitalRuby.WeatherMakerWeatherMakerLightningBoltScript
            DigitalRuby.WeatherMakerWeatherMakerLightningBoltPrefabScriptBase
              DigitalRuby.WeatherMakerWeatherMakerLightningBoltPrefabScript

Namespace:  DigitalRuby.WeatherMaker
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class WeatherMakerLightningBoltPrefabScript : WeatherMakerLightningBoltPrefabScriptBase

The WeatherMakerLightningBoltPrefabScript type exposes the following members.

Constructors
  NameDescription
Public methodWeatherMakerLightningBoltPrefabScript
Initializes a new instance of the WeatherMakerLightningBoltPrefabScript class
Top
Properties
  NameDescription
Public propertyanimation Obsolete.

The Animation attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyaudio Obsolete.

The AudioSource attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertycamera Obsolete.

The Camera attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertycollider Obsolete.

The Collider attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertycollider2D Obsolete.

The Collider2D component attached to the object.

(Inherited from Component.)
Public propertyconstantForce Obsolete.

The ConstantForce attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyenabled

Enabled Behaviours are Updated, disabled Behaviours are not.

(Inherited from Behaviour.)
Public propertygameObject

The game object this component is attached to. A component is always attached to a game object.

(Inherited from Component.)
Public propertyguiElement Obsolete. (Inherited from Component.)
Public propertyguiText Obsolete.

The GUIText attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyguiTexture Obsolete.

The GUITexture attached to this GameObject (Read Only). (null if there is none attached).

(Inherited from Component.)
Public propertyHasActiveBolts
Whether the script has active lightning bolts
(Inherited from WeatherMakerLightningBoltScript.)
Public propertyhideFlags

Should the object be hidden, saved with the scene or modifiable by the user?

(Inherited from Object.)
Public propertyhingeJoint Obsolete.

The HingeJoint attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyisActiveAndEnabled

Has the Behaviour had enabled called.

(Inherited from Behaviour.)
Public propertylight Obsolete.

The Light attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyLightAddedCallback
Fires when a light is added
(Inherited from WeatherMakerLightningBoltScript.)
Public propertyLightningEndedCallback
Fires when lightning bolt is ended (trunk width, start, end)
(Inherited from WeatherMakerLightningBoltScript.)
Public propertyLightningStartedCallback
Fires when lightning bolt is created (trunk width, start, end)
(Inherited from WeatherMakerLightningBoltScript.)
Public propertyLightRemovedCallback
Fires when a light is removed
(Inherited from WeatherMakerLightningBoltScript.)
Public propertyname

The name of the object.

(Inherited from Object.)
Public propertynetworkView Obsolete.

The NetworkView attached to this GameObject (Read Only). (null if there is none attached).

(Inherited from Component.)
Public propertyparticleEmitter Obsolete.

The ParticleEmitter attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyparticleSystem Obsolete.

The ParticleSystem attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyRandomOverride
Override the random generator for the bolts
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public propertyrenderer Obsolete.

The Renderer attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyrigidbody Obsolete.

The Rigidbody attached to this GameObject. (Null if there is none attached).

(Inherited from Component.)
Public propertyrigidbody2D Obsolete.

The Rigidbody2D that is attached to the Component's GameObject.

(Inherited from Component.)
Public propertyrunInEditMode

Allow a specific instance of a MonoBehaviour to run in edit mode (only available in the editor).

(Inherited from MonoBehaviour.)
Public propertytag

The tag of this game object.

(Inherited from Component.)
Public propertytransform

The Transform attached to this GameObject.

(Inherited from Component.)
Public propertyuseGUILayout

Disabling this lets you skip the GUI layout phase.

(Inherited from MonoBehaviour.)
Top
Methods
  NameDescription
Protected methodAwake
Awake
(Inherited from WeatherMakerLightningBoltScript.)
Public methodBroadcastMessage(String)

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

(Inherited from Component.)
Public methodBroadcastMessage(String, Object)

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

(Inherited from Component.)
Public methodBroadcastMessage(String, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

(Inherited from Component.)
Public methodBroadcastMessage(String, Object, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object or any of its children.

(Inherited from Component.)
Public methodCancelInvoke

Cancels all Invoke calls on this MonoBehaviour.

(Inherited from MonoBehaviour.)
Public methodCancelInvoke(String)

Cancels all Invoke calls with name methodName on this behaviour.

(Inherited from MonoBehaviour.)
Public methodCompareTag

Is this game object tagged with tag ?

(Inherited from Component.)
Public methodCreateLightningBolt
Create a lightning bolt
(Overrides WeatherMakerLightningBoltPrefabScriptBaseCreateLightningBolt(LightningBoltParameters).)
Public methodCreateLightningBolts
Create multiple lightning bolts, attempting to batch them into as few draw calls as possible
(Inherited from WeatherMakerLightningBoltScript.)
Protected methodCreateLightningBoltsNow
Create lightning bolts immediately
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Protected methodCreateParameters
Create new lightning bolt parameters and populate
(Inherited from WeatherMakerLightningBoltScript.)
Public methodEquals (Inherited from Object.)
Protected methodFinalize (Inherited from Object.)
Public methodGetComponent(Type)

Returns the component of Type type if the game object has one attached, null if it doesn't.

(Inherited from Component.)
Public methodGetComponent(String)

Returns the component with name type if the game object has one attached, null if it doesn't.

(Inherited from Component.)
Public methodGetComponent``1 (Inherited from Component.)
Public methodGetComponentInChildren(Type)

Returns the component of Type type in the GameObject or any of its children using depth first search.

(Inherited from Component.)
Public methodGetComponentInChildren(Type, Boolean) (Inherited from Component.)
Public methodGetComponentInChildren``1 (Inherited from Component.)
Public methodGetComponentInChildren``1(Boolean) (Inherited from Component.)
Public methodGetComponentInParent(Type)

Returns the component of Type type in the GameObject or any of its parents.

(Inherited from Component.)
Public methodGetComponentInParent``1 (Inherited from Component.)
Public methodGetComponents(Type)

Returns all components of Type type in the GameObject.

(Inherited from Component.)
Public methodGetComponents(Type, ListComponent) (Inherited from Component.)
Public methodGetComponents``1 (Inherited from Component.)
Public methodGetComponents``1(ListUMP) (Inherited from Component.)
Public methodGetComponentsInChildren(Type)

Returns all components of Type type in the GameObject or any of its children.

(Inherited from Component.)
Public methodGetComponentsInChildren(Type, Boolean)

Returns all components of Type type in the GameObject or any of its children.

(Inherited from Component.)
Public methodGetComponentsInChildren``1 (Inherited from Component.)
Public methodGetComponentsInChildren``1(Boolean) (Inherited from Component.)
Public methodGetComponentsInChildren``1(ListUMP) (Inherited from Component.)
Public methodGetComponentsInChildren``1(Boolean, ListUMP) (Inherited from Component.)
Public methodGetComponentsInParent(Type) (Inherited from Component.)
Public methodGetComponentsInParent(Type, Boolean)

Returns all components of Type type in the GameObject or any of its parents.

(Inherited from Component.)
Public methodGetComponentsInParent``1 (Inherited from Component.)
Public methodGetComponentsInParent``1(Boolean) (Inherited from Component.)
Public methodGetComponentsInParent``1(Boolean, ListUMP) (Inherited from Component.)
Public methodGetHashCode (Inherited from Object.)
Public methodGetInstanceID

Returns the instance id of the object.

(Inherited from Object.)
Public methodGetType (Inherited from Object.)
Public methodInvoke

Invokes the method methodName in time seconds.

(Inherited from MonoBehaviour.)
Public methodInvokeRepeating

Invokes the method methodName in time seconds, then repeatedly every repeatRate seconds.

(Inherited from MonoBehaviour.)
Public methodIsInvoking

Is any invoke pending on this MonoBehaviour?

(Inherited from MonoBehaviour.)
Public methodIsInvoking(String)

Is any invoke on methodName pending?

(Inherited from MonoBehaviour.)
Protected methodLateUpdate
LateUpdate
(Inherited from WeatherMakerLightningBoltScript.)
Protected methodMemberwiseClone (Inherited from Object.)
Protected methodOnCreateParameters
Get new lightning bolt parameters
(Inherited from WeatherMakerLightningBoltScript.)
Protected methodOnDrawGizmos
Draw gizmos
(Overrides WeatherMakerLightningBoltPrefabScriptBaseOnDrawGizmos.)
Protected methodPopulateParameters
Fill in lightning bolt parameters
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public methodSendMessage(String)

Calls the method named methodName on every MonoBehaviour in this game object.

(Inherited from Component.)
Public methodSendMessage(String, Object)

Calls the method named methodName on every MonoBehaviour in this game object.

(Inherited from Component.)
Public methodSendMessage(String, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object.

(Inherited from Component.)
Public methodSendMessage(String, Object, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object.

(Inherited from Component.)
Public methodSendMessageUpwards(String)

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

(Inherited from Component.)
Public methodSendMessageUpwards(String, Object)

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

(Inherited from Component.)
Public methodSendMessageUpwards(String, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

(Inherited from Component.)
Public methodSendMessageUpwards(String, Object, SendMessageOptions)

Calls the method named methodName on every MonoBehaviour in this game object and on every ancestor of the behaviour.

(Inherited from Component.)
Protected methodStart
Start
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public methodStartCoroutine(IEnumerator)

Starts a coroutine.

(Inherited from MonoBehaviour.)
Public methodStartCoroutine(String)

Starts a coroutine named methodName.

(Inherited from MonoBehaviour.)
Public methodStartCoroutine(String, Object)

Starts a coroutine named methodName.

(Inherited from MonoBehaviour.)
Public methodStartCoroutine_Auto Obsolete. (Inherited from MonoBehaviour.)
Public methodStopAllCoroutines

Stops all coroutines running on this behaviour.

(Inherited from MonoBehaviour.)
Public methodStopCoroutine(String)

Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.

(Inherited from MonoBehaviour.)
Public methodStopCoroutine(IEnumerator)

Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.

(Inherited from MonoBehaviour.)
Public methodStopCoroutine(Coroutine)

Stops the first coroutine named methodName, or the coroutine stored in routine running on this behaviour.

(Inherited from MonoBehaviour.)
Public methodToString

Returns the name of the GameObject.

(Inherited from Object.)
Public methodTrigger
Manually trigger the lightning once
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public methodTrigger(Single)
Manually trigger lightning
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public methodTrigger(NullableVector3, NullableVector3)
Manually trigger lightning
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Protected methodUpdate
Update
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Top
Fields
  NameDescription
Public fieldAutomaticModeSeconds
Turns lightning into automatic mode for this number of seconds, then puts it into manual mode.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldCamera
The camera the lightning should be shown in. Defaults to the current camera, or the main camera if current camera is null. If you are using a different camera, you may want to put the lightning in it's own layer and cull that layer out of any other cameras.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldCameraMode
Type of camera mode. Auto detects the camera and creates appropriate lightning. Can be overriden to do something more specific regardless of camera.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldChaosFactor
The chaos factor that determines how far the lightning main trunk can spread out, higher numbers spread out more. 0 - 1.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldChaosFactorForks
The chaos factor that determines how far the forks of the lightning can spread out, higher numbers spread out more. 0 - 1.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldCompensateForParentTransform
Whether to compensate for the parent transform. Default is false. If true, rotation, scale and position are altered by the parent transform. Use this to fix scaling, rotation and other offset problems with the lightning.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldCountProbabilityModifier
Reduces the probability that additional bolts from CountRange will actually happen (0 - 1).
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldCountRange
How many lightning bolts to emit for each interval
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldCustomTransformHandler
Custom handler to modify the transform of each lightning bolt, useful if it will be alive longer than a few frames and needs to scale and rotate based on the position of other objects.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldDelayRange
Delay in seconds (range) before each additional lightning bolt in count range is emitted
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldDestination
The destination game object, can be null
Public fieldDestinationBlendMode
Destination blend mode. Default is One. For additive blend use One. For alpha blend use OneMinusSrcAlpha.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldDurationRange
For each bolt emitted, how long should it stay in seconds
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldEndVariance
X, Y and Z for variance from the end point. Use positive values.
Public fieldEndWidthMultiplier
How much smaller the lightning should get as it goes towards the end of the bolt. For example, 0.5 will make the end 50% the width of the start.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldFadeFullyLitMultiplier
Modify the duration of fully lit lightning.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldFadeInMultiplier
Modify the duration of lightning fade in.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldFadeOutMultiplier
Modify the duration of lightning fade out.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldFadePercent
What percent of time the lightning should fade in and out. For example, 0.15 fades in 15% of the time and fades out 15% of the time, with full visibility 70% of the time.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldForkedness
How forked should the lightning be? (0 - 1, 0 for none, 1 for lots of forks)
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldForkEndWidthMultiplier
Forks have their EndWidthMultiplier multiplied by this value
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldForkLengthMultiplier
Minimum distance multiplier for forks
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldForkLengthVariance
Fork distance multiplier variance. Random range of 0 to n that is added to Fork Length Multiplier.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldGenerations
Generations (1 - 8, higher makes more detailed but more expensive lightning)
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldGlowIntensity
The intensity of the glow
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldGlowTintColor
Tint color for the lightning glow
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldGlowWidthMultiplier
The width multiplier for the glow, 0 - 64
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldGrowthMultiplier
0 - 1, how slowly the lightning should grow. 0 for instant, 1 for slow.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldHideGizmos
Whether to hide gizmos
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldIntensity
Intensity of the lightning
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldIntensityFlicker
Cause lightning to flicker, x = min, y = max, z = time multiplier, w = add to intensity
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldIntensityFlickerTexture
Lightning intensity flicker lookup texture
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldIntervalRange
How long to wait before creating another round of lightning bolts in seconds
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldJitterMultiplier
Jitter multiplier to randomize lightning size. Jitter depends on trunk width and will make the lightning move rapidly and jaggedly, giving a more lively and sometimes cartoony feel. Jitter may be shared with other bolts depending on materials. If you need different jitters for the same material, create a second script object.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLevelOfDetailDistance
If non-zero, the Camera property is used to get distance of lightning from camera. Lightning generations is reduced for each distance from camera. For example, if LevelOfDetailDistance was 100 and the lightning was 200 away from camera, generations would be reduced by 2, to a minimum of 1.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLifeTime
How long (in seconds) this game object should live before destroying itself. Leave as 0 for infinite.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldLightningDestinationParticleSystem
Particle system to play at the point of impact (end). 'Emission rate' particles will be emitted all at once.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLightningGlowTexture
The texture to use for the lightning glow, or null for the material default texture.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLightningMaterialMesh
Lightning material for mesh renderer - glow
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLightningMaterialMeshNoGlow
Lightning material for mesh renderer - bolt
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLightningOriginParticleSystem
Particle system to play at the point of emission (start). 'Emission rate' particles will be emitted all at once.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLightningTexture
The texture to use for the lightning bolts, or null for the material default texture.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLightningTintColor
Tint color for the lightning
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldLightParameters
Light parameters
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldManualMode
Manual or automatic mode. Manual requires that you call the Trigger method in script. Automatic uses the interval to create lightning continuously.
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldMaximumLightsPerBatch
Maximum number of lights that can be created per batch of lightning
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldMultiThreaded
Whether to use multi-threaded generation of lightning. Lightning will be delayed by about 1 frame if this is turned on, but this can significantly improve performance.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldQualitySetting
Lightning quality setting. This allows setting limits on generations, lights and shadow casting lights based on the global quality setting.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldRenderQueue
The render queue for the lightning. -1 for default.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldSoftParticlesFactor
Soft particles factor. 0.01 to 3.0 are typical, 100.0 to disable.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldSortLayerName
Sort layer name
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldSortOrderInLayer
Order in sort layer
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldSource
The source game object, can be null
Public fieldSourceBlendMode
Source blend mode. Default is SrcAlpha.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldStartVariance
X, Y and Z for variance from the start point. Use positive values.
Public fieldTrunkWidthRange
The trunk width range in unity units (x = min, y = max)
(Inherited from WeatherMakerLightningBoltPrefabScriptBase.)
Public fieldTurbulence
Built in turbulance based on the direction of each segment. Small values usually work better, like 0.2.
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldTurbulenceVelocity
Global turbulence velocity for this script
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldUseGameTime
True to use game time, false to use real time
(Inherited from WeatherMakerLightningBoltScript.)
Public fieldUseWorldSpace
True if you are using world space coordinates for the lightning bolt, false if you are using coordinates relative to the parent game object.
(Inherited from WeatherMakerLightningBoltScript.)
Top
Extension Methods
  NameDescription
Public Extension MethodCachedName
Get cached name
(Defined by WeatherMakerObjectExtensions.)
Public Extension MethodSetCachedName
Put name in the cache
(Defined by WeatherMakerObjectExtensions.)
Top
See Also