Skip to content

Instantly share code, notes, and snippets.

@Jayatubi
Jayatubi / Docker.cs
Created December 28, 2020 08:40 — forked from Thundernerd/Docker.cs
Helper to dock EditorWindows
using System;
using System.Reflection;
using UnityEditor;
using UnityEngine;
public static class Docker
{
public enum DockPosition
{
Left,
#include "MemoryPool.h"
namespace GX
{
#define GX_ENABLE_MEMORY_POOL
U8* MemoryPoolAllocator::allocImpl(U32 size)
{
U8* result = nullptr;
#ifndef GX_MEMORYPOOL_H
#define GX_MEMORYPOOL_H
#include "Thread.h"
#define GX_ENABLE_MEMORYPOOL_STATS
namespace GX
{
template<typename ValueType, typename ...ArgTypes >
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEditor.Build;
using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering;
@Jayatubi
Jayatubi / TFunctionProxy.cpp
Last active November 5, 2018 07:43
TFunctionProxy
template<typename LambdaType, typename ReturnType, typename ... ArgTypes>
struct LambdaPrototype
{
typedef LambdaType* FuncType;
static ReturnType invoke(lua_State* L, void* ptr, ArgTypes&& ... args)
{
return Func != nullptr ? (*Func)(std::forward<ArgTypes>(args)...) : ReturnType();
}
@Jayatubi
Jayatubi / NotchUtil.java
Created May 24, 2018 05:18
Detect notch on Android devices for Huawei, Oppo, Vivo
package com.actgames.fci.util;
import android.app.Activity;
import com.unity3d.player.UnityPlayer;
import java.lang.reflect.Method;
/**
* Created by mofei on 2018/5/11.