Faizibrahim
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.2k
- Forks
- 1.8k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 6
Description
using UnityEngine;
using UnityEngine.UI;
public class SettingsManager : MonoBehaviour
{
[Header("Controls")]
public Slider joystickSensitivitySlider;
public Toggle hapticToggle;
[Header("Audio")]
public Slider masterVolumeSlider;
void Start()
{
LoadSettings();
}
public void SetJoystickSensitivity(float value)
{
PlayerPrefs.SetFloat("JoystickSensitivity", value);
PlayerPrefs.Save();
}
public void SetHapticFeedback(bool enabled)
{
PlayerPrefs.SetInt("HapticFeedback", enabled ? 1 : 0);
PlayerPrefs.Save();
}
public void SetMasterVolume(float value)
{
PlayerPrefs.SetFloat("MasterVolume", value);
AudioListener.volume = value;
PlayerPrefs.Save();
}
public void LoadSettings()
{
joystickSensitivitySlider.value = PlayerPrefs.GetFloat("JoystickSensitivity", 1f);
hapticToggle.isOn = PlayerPrefs.GetInt("HapticFeedback", 1) == 1;
masterVolumeSlider.value = PlayerPrefs.GetFloat("MasterVolume", 1f);
AudioListener.volume = masterVolumeSlider.value;
}
}
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No repository file, test, entry point, or requested change is identified; start by clarifying what this Unity C# snippet is intended to contribute to vercel/examples. Until a target example, integration point, and completion criteria are provided, there is no verifiable definition of done.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp, unity
- Domain
- game-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 10/100