我目前正在尝试使用Unity,我需要访问和修改另一个对象的公共文件。
ref int score = ref collision.collider.GetComponent<PlatformManager>().score;
然而,这给了我Assets/Scripts/PlatformBehaviour.cs(69,20): error CS1525: Unexpected symbol 'ref' and 'Assets/Scripts/PlatformBehaviour.cs(69,4): error CS1525: Unexpected symbol 'ref'
编辑:拼写错误