Skip to content

Instantly share code, notes, and snippets.

View veyselerCS's full-sized avatar

veyselerCS

  • İstanbul
View GitHub Profile
@veyselerCS
veyselerCS / MoveToTopMenuItem.cs
Created April 18, 2023 11:08
Unity Inspector Componenet Move To Top MenuItem
using UnityEditor;
using UnityEngine;
public class MoveToTopMenuItem : MonoBehaviour
{
[MenuItem("CONTEXT/Component/Move To Top")]
private static void MoveToTop(MenuCommand command)
{
Component component = command.context as Component;
@veyselerCS
veyselerCS / ReflectionComparisonTest
Last active August 1, 2023 09:13
Performance test script for setting a field with various ways c#
using System;
using System.Reflection;
using System.Reflection.Emit;
using NUnit.Framework;
using Unity.PerformanceTesting;
public class ReflectionComparisonTest
{
//Test environment
private int _warmupCount = 5;