method getKeyById

key getKeyById(string id);

Argumente

Zurückgegebener Wert

This method returns a key object for the given ID, or null if one is not found.
function onSample()
{
    var keyGroup = scene.getKeyGroupById("keyGrp");
    if (keyGroup)
    {
        var key = keyGroup.getKeyById("myKey");
        if (key)
        {
             keyGroup.removeKey(key);
        }
    }
}