I am doing an attempt to make a 3D snake game, as an experiment but I am still a beginner. I have a Sphere that I wish to dynamically resize to be, let's say, the 20th part of the width of this Plane. How can I do this? I thought to find the size of the Plane first. I also thought to use Screen.width and Screen.height because in my actual project the Plane is almost the size of the screen, but from what I found the Transform class does not have a way to resize it to a specific dimension in pixels.
Using the code below I do not get this work, but I also see that the Sphere becomes a black circle because of the only instruction in the Start method.
Existing code
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// Attached to the Plane
public class SphereResizer : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
// what should I put here?
GameObject.Find("Sphere").transform.localScale = new Vector3(1f, 1f);
}
// Update is called once per frame
void Update()
{
}
}
Screenshots
Download the example
Here is the GitHub repository.
Thank you.

