Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
using UnityEngine.UI;
public class CameraController : MonoBehaviour {
// 『Slider』オブジェクトへの参照
GameObject sliderObject;
// 『ZoomText』オブジェクトへの参照
GameObject zoomTextObject;
// Sliderコンポーネントの参照
Slider zoomSlider;
// Textコンポーネントの参照
Text zoomText;
// 拡大率のテキストで変数以外の部分を定義
string zoomTextPrefix = "Magnification : ";
string zoomTextSuffix = "%";
// 拡大率の最小値と最大値
const int OffsetMin = 50;
const int OffsetMax = 150;
// カメラの拡大率(%)
[SerializeField, Range(OffsetMin, OffsetMax)]
int magnify = 100;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.