This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Config { | |
private static Gson GSON = new GsonBuilder().setPrettyPrinting().create(); // got a bunch of cool config options | |
int someIntValue = 5; // field where the values will be held, default value would be 5 | |
String aString = "hello world"; // lots of standard types work, you can always register new deserializers in your GSON instance. google it. | |
public static Config readConfig() { | |
Path configFile = FabricLoader.getInstance().getConfigDir().resolve("filename.json"); | |
try { | |
// read file contents and let gson construct an instance of it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MoveAroundObject : MonoBehaviour | |
{ | |
[SerializeField] | |
private float _mouseSensitivity = 3.0f; | |
private float _rotationY; |