vercel / vercel/examples

Faizibrahim

Open
#1,206 0 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.