Skip to content

Instantly share code, notes, and snippets.

View Hadjime's full-sized avatar

HadjimeSun Hadjime

View GitHub Profile
@Hadjime
Hadjime / GradientUnsafe.cs
Created October 12, 2023 09:10 — forked from viruseg/.Interaction in unity with Gradient via jobs + burst.cs
Interaction in unity with Gradient via jobs + burst
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Runtime.InteropServices;
using Unity.Collections;
using Unity.Collections.LowLevel.Unsafe;
using Unity.Mathematics;
using UnityEngine;
namespace GradientUnsafe
@Hadjime
Hadjime / DrowsyLogger.cs
Created February 19, 2022 11:22 — forked from baruchadi/DrowsyLogger.cs
useful Debug.log extensions
using System;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Utils
{
public static class DrowsyLogger
{
public static string Color(this string myStr, string color)
{
@Hadjime
Hadjime / addressable_asset.md
Created August 13, 2021 10:22 — forked from MeowKim/addressable_asset.md
Guide for Unity Addressable Asset System.

📝 About

Guide for Unity Addressable Asset System.
Check out this sample code repo.

This guide supports languages below.

Created: 2020-07-03
Last updated: 2020-08-26 minor typo correction

@Hadjime
Hadjime / LICENSE
Created July 22, 2021 13:30 — forked from JohannesMP/LICENSE
[Unity3D] A Reliable, user-friendly way to reference SceneAssets by script.
/*******************************************************************************
* Don't Be a Jerk: The Open Source Software License.
* Adapted from: https://github.com/evantahler/Dont-be-a-Jerk
*******************************************************************************
* _I_ am the software author - JohannesMP on Github.
* _You_ are the user of this software. You might be a _we_, and that's OK!
*
* This is free, open source software. I will never charge you to use,
* license, or obtain this software. Doing so would make me a jerk.
*
Shader "Name" {
Properties {
_Name ("display name", Range (min, max)) = number
_Name ("display name", Float) = number
_Name ("display name", Int) = number
_Name ("display name", Color) = (number,number,number,number)
_Name ("display name", Vector) = (number,number,number,number)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Text.RegularExpressions;
using UnityEditor;
using UnityEditor.AddressableAssets.Settings;
using UnityEditor.AddressableAssets.Settings.GroupSchemas;
using UnityEditor.Build.Pipeline.Utilities;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
namespace PretendLand.Common.Editor
{
public class BuildAddressablesBeforeBuildPlayer : IPreprocessBuildWithReport
{
int IOrderedCallback.callbackOrder => 1;
@Hadjime
Hadjime / BuildAddressables.cs
Created July 1, 2021 03:15 — forked from favoyang/BuildAddressables.cs
Build addressable bundles when clicking the build button
/// <summary>
/// The script gives you choice to whether to build addressable bundles when clicking the build button.
/// For custom build script, call PreExport method yourself.
/// For cloud build, put BuildAddressablesProcessor.PreExport as PreExport command.
/// Discussion: https://forum.unity.com/threads/how-to-trigger-build-player-content-when-build-unity-project.689602/
/// </summary>
using UnityEditor;
using UnityEditor.AddressableAssets;
using UnityEditor.AddressableAssets.Settings;
using UnityEngine;
@Hadjime
Hadjime / EasingFunctions.cs
Created May 4, 2021 04:17 — forked from cjddmut/EasingFunctions.cs
Easing Functions for Unity3D
/*
* Created by C.J. Kimberlin
*
* The MIT License (MIT)
*
* Copyright (c) 2019
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
@Hadjime
Hadjime / 1.md
Created April 28, 2020 11:59 — forked from LotteMakesStuff/1.md
UPM: How to make a custom package

UPM: How to make a custom package So, Unity has this shiny new package manager, and you have code you want to share between projects - wouldn't it be great if we could bundle up our shared code and plug it into all the projects that need it? Let's figure out how to make our own Package!


Todo

  • Modify the project manifest
  • Make a package manifest
  • Package the manifest up with some test code
  • Try it out in Unity!