Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetFloatValue

Retrieves the float value that the binding points to.
Read time 1 minuteLast updated 5 days ago

Definition

  • Type: Method
  • Namespace: UnityEditor
  • Assembly: UnityEditor

GetFloatValue(GameObject, EditorCurveBinding, float)

Retrieves the float value that the binding points to.
public static bool GetFloatValue(GameObject root, EditorCurveBinding binding, out float data)

Parameters

The root GameObject of the animated hierarchy.

The binding that defines the path and the properties of the value.

data

The resulting float value, if a value exists.

Returns

Type

Description

boolReturns True if the value exists. False otherwise.

Remarks

Use this method when recording keyframes.

GetFloatValue(GameObject, string, Type, string, float)

Samples a curve on the GameObject you pass in and retrieves the current float value.
Warning
Deprecated. This overload is deprecated. Use the one with EditorCurveBinding instead.
public static bool GetFloatValue(GameObject root, string relativePath, Type type, string propertyName, out float data)

Parameters


relativePath


type


propertyName


data

Returns

Type

Description

bool

Remarks

Use this method when recording keyframes.