Version: 2018.2
public int AddKey (float time, float value);

Parameters

timeThe time at which to add the key (horizontal axis in the curve graph).
valueThe value for the key (vertical axis in the curve graph).

Returns

int The index of the added key, or -1 if the key could not be added.

Description

Добавляет новый ключ в кривую.

Smooth tangents are automatically computed for the key. Returns the index of the added key. If no key could be added because there is already another keyframe at the same time -1 will be returned.

See Also: Переменная keys.


public int AddKey (Keyframe key);

Parameters

keyДобавляет новый ключ в кривую.

Returns

int The index of the added key, or -1 if the key could not be added.

Description

Добавляет новый ключ в кривую.

Returns the index of the added key. If no key could be added because there is already another keyframe at the same time -1 will be returned.

See Also: переменная keys, структура Keyframe.