Skip to content

Instantly share code, notes, and snippets.

View KaganAyten's full-sized avatar
🎯
Studying

Kağan Ayten KaganAyten

🎯
Studying
View GitHub Profile
using UnityEditor;
using UnityEditor.SceneManagement;
[InitializeOnLoad]
public static class StartAtFirstScene
{
static StartAtFirstScene()
{
EditorApplication.playModeStateChanged += LoadStartScene;
}
@KaganAyten
KaganAyten / DynamicHeaderDrawer.cs
Created May 21, 2025 05:49
Creates Dynamic Header On Inspector
using UnityEditor;
using UnityEngine;
[CustomPropertyDrawer(typeof(DynamicHeaderAttribute))]
public class DynamicHeaderDrawer : PropertyDrawer
{
public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
{
GUIStyle headerStyle = new GUIStyle(EditorStyles.boldLabel)
{
@KaganAyten
KaganAyten / ButtonSelectedCursorController.cs
Created January 11, 2025 03:19
Simple Joystick Navigator
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.InputSystem;
using UnityEngine.UI;
public class ButtonSelectedCursorController : MonoBehaviour
{
@KaganAyten
KaganAyten / C#
Created February 23, 2024 05:06
FootstepSFXController
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class FootstepController : MonoBehaviour
{
private AudioSource aSource;
[SerializeField] private LayerMask groundLayer;
[SerializeField] private AudioClip walk, sandWalk, mudWalk,grassWalk,metalWalk;
private RaycastHit hit;