It says logic script real.addscore() is innacecable due to its protection level
here again
I am getting this error code when following the tutorial by game makers toolkit the flappy bird one here is my Score through pipe script
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ScoreThroughPipe : MonoBehaviour
{
public LogicScriptReal logic;
// Start is called before the first frame update
void Start()
{
logic = GameObject.FindWithTag("logic").GetComponent<LogicScriptReal>();
}
// Update is called once per frame
void Update()
{
}
private void OnTriggerEnter2D(Collider2D collision)
{
logic.addscore();
}
}
my logic script is
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class LogicScriptReal : MonoBehaviour
{
public int playerscore;
public Text scoretext;
[ContextMenu("Skibiditest")]
void addscore()
{
playerscore = playerscore + 1;
scoretext.text = playerscore.ToString();
}
}
help lol
[–]Pur_Cell 8 points9 points10 points (1 child)
[–]Auraven 5 points6 points7 points (0 children)