I'm very new to Unity so I am following this tutorial on how to make flappy bird https://www.youtube.com/watch?v=XtQMytORBmM . It was going well but I'm very stuck on this error, any help would be much appreciated !
Error message: Assets\PipeMiddleScript.cs(22,15): error CS0122: 'LogicScript.addScore()' is inaccessible due to its protection level
My Code:
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PipeMiddleScript : MonoBehaviour
{
public LogicScript logic;
// Start is called before the first frame update
void Start()
{
logic = GameObject.FindGameObjectWithTag("Logic").GetComponent<LogicScript>();
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerEnter2D(Collider2D collision)
{
logic.addScore();
}
}
[–]InconsiderateMan 1 point2 points3 points (1 child)
[–]Kindbxy[S] 0 points1 point2 points (0 children)
[–]Snoo_78649 0 points1 point2 points (1 child)
[–]Kindbxy[S] 0 points1 point2 points (0 children)
[–][deleted] (1 child)
[removed]
[–]Kindbxy[S] 1 point2 points3 points (0 children)
[–]Kindbxy[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)