using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
[SerializeField] KeyCode keyOne;
[SerializeField] KeyCode keyTwo;
[SerializeField] Vector3 moveDirection;
private void FixedUpdate()
{
if (Input.GetKey(keyOne))
{
GetComponent<Rigidbody>().velocity += moveDirection;
}
if (Input.GetKey(keyTwo))
{
GetComponent<Rigidbody>().velocity += moveDirection;
}
}
} // Не забудьте эту закрывающую скобку для класса
аБДУ абУУченик (81)
4 недели назад
KeyNotFoundException: The given key 'Russian' was not present in the dictionary.
System.Collections.Generic.Dictionary`2[TKey,TValue].get_Item (TKey key) (at <34c8028f8a3946349d8f0d77e409a1ae>:0)
UnityEngine.UIElements.PanelTextSettings.UpdateLocalizationFontAsset () (at <af86ccbf83ec4a668908187abd529b22>:0)
UnityEngine.UIElements.PanelTextSettings.get_defaultPanelTextSettings () (at <af86ccbf83ec4a668908187abd529b22>:0)
UnityEngine.UIElements.TextUtilities.GetTextSettingsFrom (UnityEn
это может к этому относиться?
using System.Collections.Generic;
using UnityEngine;
public class Player : MonoBehaviour
{
[SerializedField] KeyCode keyOne;
[SerializedField] KeyCode keyTwo;
[SerializedField] Vector3 moveDirection;
private void FixedUpdate ()
{
if (InputGetKey(keyOne))
{
GetComponent<RigitBody>().velocity += moveDirection;
}
if (InputGetKey(keyTwo))
{
GetComponent<RigitBody>().velocity += moveDirection;
}
}
проблема: Assets\Scenes\Player.cs(21,5): error CS1513: Требуется "}"