- Home /
Question by
Applebugr21 · Apr 27, 2020 at 05:12 PM ·
error2d game
How do you make the Character or the Bird visible in the game tab?,How do you make the object or the character appear in the game section?
Hello this is a code that I got from by watching jason weimann so I don't think there is anything wrong with the code but... using System; using UnityEngine;
public class Bird : MonoBehaviour
{
//MouseDown
private void OnMouseDown()
{
GetComponent<SpriteRenderer>().color = Color.red;
}
//MouseUp
private void OnMouseUp()
{
GetComponent<SpriteRenderer>().color = Color.white;
}
private void OnMouseDrag()
{
Vector3 newPosition = Camera.main.ScreenToWorldPoint(Input.mousePosition);
transform.position = new Vector3(newPosition.x, newPosition.y);
}
}
So when I run the game I can see the bird in the scene tab but when I go over to the game tab and run it I can't see, drag, or click the bird. How do I fix this? Is there an option for this?
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612232625im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
How to change variables inside FindGameObjectsWithTag objects 0 Answers
Why can't my Physics.Raycast work 1 Answer
Is it possible to use scripts without MonoBehaviour on GameObjects? 1 Answer
cant play game because of InternalEngineBridge error 0 Answers
How can I spawn different GameObjects using IEnumerator? 1 Answer