Click or drag to resize

SendFloatArray_Example Class

An example of how to use SendFloatArray. While you can only send 4 values at a time, if you need your object to 5+ different values, at different times, you can do this via a switch/case, like this example shows. If you are using 4 of less values Then there is no need to use the switch example, but instead to just assign your values as you need them.
Inheritance Hierarchy
SystemObject
  Object
    Component
      Behaviour
        MonoBehaviour
          SimpleDemosSendFloatArray_Example

Namespace:  SimpleDemos
Assembly:  Assembly-CSharp (in Assembly-CSharp.dll) Version: 0.0.0.0
Syntax
public class SendFloatArray_Example : MonoBehaviour

The SendFloatArray_Example type exposes the following members.

Constructors
  NameDescription
Public methodSendFloatArray_Example
Initializes a new instance of the SendFloatArray_Example class
Top
Methods
  NameDescription
Public methodStatic memberMyFloatFunction
What I want to do with the float values passed around for this object (_id). By using a case statement and reservering the last index for the switch value, I can execute more than 4 different things with this 1 function depending on what floats I want to send.
Private methodStart
Initialize values
Private methodUpdate
Top
Fields
  NameDescription
Public fieldm_MyFloats
The floats that will be sent
Public fieldm_ObjectToSendFloats
Provides an easy way to access the object we want to send floats with/for.
Public fieldm_SendFloat
Bool that toggles when we send the floats, gets set to false after we send to save bandwidth
Top
See Also