#I m not really sure what you mean by
1 messages · Page 1 of 1 (latest)
Opening a new thread about it just not to clog the chat
The situation is the following: I have a Cursor (as you can see from the hierarchy) and a CursorController is attached to it as a component.
My Player looks like this:
What's the difference between Cursor and CursorController?
public class Player : MonoBehaviour
{
public CursorController cursor;
private PlayerInput _playerInput;
private void Awake()
{
_playerInput = transform.GetComponent<PlayerInput>();
}
// Start is called before the first frame update
void Start()
{
}
public void FixedUpdate()
{
_playerInput.UpdateMovement();
cursorC.ApplyMovement(_playerInput.Movement);
}
// Update is called once per frame
void Update()
{
}
}
Cursor is a GameObject, CursorController is a script that should take care of that gameobject's input's response
From this screenshot it looks like you had or have a script named "Cursor" too
I had one, yes
make sure you don't have any compile errors in console
I used to have a Cursor script, that would call the CursorController
because your player script still seems to be looking for the Cursor script according to that screenshot - which could be due to compile errors
Indeed there are compiler errors atm
#1 should be to fix those.
you won't be able to do much of the rest without fixing them
Alright, should be all good now
Yes, it was still looking for that Cursor, as it couldn't fully recompile
Silly mistake- thank you!
Just to clarify
so has that resolved your issue? Do you see now how to assign the CursorController?
I can always attach an object (e.g.: Cursor) whenever I have an attribute that requires a component present in that object?
As I do seem to be able to do that:
If you have a public CursorController field, you can assign any object that has a CursorController from the same scene.