Skip to content

Instantly share code, notes, and snippets.

View fum1h1ro's full-sized avatar
⚔️
?

fum1h1ro fum1h1ro

⚔️
?
View GitHub Profile
@fum1h1ro
fum1h1ro / godot_build.sh
Created September 20, 2023 10:20
godot_build.sh
#!/bin/sh
scons platform=macos arch=arm64 module_mono_enabled=yes target=editor vulkan_sdk_path=$HOME/Developer/VulkanSDK/1.3.261.1
bin/godot.macos.editor.arm64.mono --headless --generate-mono-glue modules/mono/glue
./modules/mono/build_scripts/build_assemblies.py --godot-output-dir=./bin
cp -r misc/dist/macos_tools.app ./Godot.app
mkdir -p Godot.app/Contents/MacOS
cp bin/godot.macos.editor.arm64.mono Godot.app/Contents/MacOS/Godot
@fum1h1ro
fum1h1ro / SyncAssets
Last active September 13, 2023 07:16
タイムスタンプじゃなくファイルのハッシュで変更を検知するツール
DROPBOX_ROOT = File.expand_path("~/Hoge Dropbox") + "/hoge"
PROJECT_ROOT = "Unity"
ASSETS_ROOT = "#{PROJECT_ROOT}/Assets"
ADDRESSABLE_RESOURCES_ROOT = "#{ASSETS_ROOT}/AddressableResources"
REFERENCED_RESOURCES_ROOT = "#{ASSETS_ROOT}/ReferencedResources"
SPRITES_ROOT = "#{REFERENCED_RESOURCES_ROOT}/Sprites"
BACKGROUND_ROOT = "#{REFERENCED_RESOURCES_ROOT}/Background"
SPINE_CHARACTER_ROOT = "#{REFERENCED_RESOURCES_ROOT}/SpineResources/Characters"
SPINE_EFFECT_ROOT = "#{REFERENCED_RESOURCES_ROOT}/SpineResources/Effects"
SPINE_MAP_ROOT = "#{REFERENCED_RESOURCES_ROOT}/SpineMapResources"
namespace Project
{
export class HtmlParser
{
public static Parse(html: string): HtmlParser
{
return new HtmlParser(html);
}
private constructor(private readonly html: string)
@fum1h1ro
fum1h1ro / shaderconfig.sh
Created January 22, 2021 03:44
shaderconfig generator for HLSL Tools
#!/bin/sh
set -e
pwd
PACKAGE_LINK=.shaderIncludes/Packages
PACKAGE_CACHE=Unity/Library/PackageCache
if [ -d $PACKAGE_LINK ]; then
@fum1h1ro
fum1h1ro / init.vim
Last active January 31, 2020 10:13
auto session
let g:autosession_file = getcwd().'/.vimsession'
function! AutoSession_Create()
if getftype(g:autosession_file) == ''
exec "mks!" g:autosession_file
endif
endfunction
function! AutoSession_Restore()
if getftype(g:autosession_file) != ''
@fum1h1ro
fum1h1ro / sample.cs
Created December 11, 2015 03:50
iOS実機でも動くmsgpackシリアライザ
public class Parameters {
public float warrior_walk_speed;
public float warrior_run_speed;
public int warrior_life;
public float hungry_speed;
public float initial_bread;
}
public class CustomSerializer<T> : MessagePackSerializer<T> where T : class, new() {
public CustomSerializer(SerializationContext ownerContext) : base(ownerContext) {}
protected override void PackToCore(Packer packer, T objectTree) {
@fum1h1ro
fum1h1ro / AtlasChecker.cs
Last active August 29, 2015 14:22
AtlasChecker.cs
using UnityEngine;
using UnityEditor;
using System.Linq;
using System.Collections;
using System.Collections.Generic;
public class AtlasChecker : EditorWindow {
struct TexAsset {
public string path;
public string name;
@fum1h1ro
fum1h1ro / GraphicRaycaster2.cs
Last active August 29, 2015 14:18
GraphicRaycaster2: Addapt for RenderTexture
using System;
using System.Collections.Generic;
using System.Text;
using UnityEngine.EventSystems;
namespace UnityEngine.UI
{
[AddComponentMenu("Event/Graphic Raycaster 2")]
[RequireComponent(typeof(Canvas))]
public class GraphicRaycaster2 : BaseRaycaster
@fum1h1ro
fum1h1ro / CaptureSendSlack.cs
Created February 11, 2015 08:03
UnityからスクショをSlackに投げる
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using MiniJSON;
using KeyValue = System.Collections.Generic.Dictionary<string, string>;
public class CaptureSendSlack : MonoBehaviour {
private static string CAPTURE_DIRECTORY;
private static string CAPTURE_FILENAME = "slack_share.png";
private static string CAPTURE_PATH;
@fum1h1ro
fum1h1ro / TestLWF.boo
Last active August 29, 2015 14:07
LWFの最もシンプルと思われるサンプルをBooで書くとこうなる……
import UnityEngine
class TestLWF (LWFObject):
def Start ():
set_loader()
Load(
'lwfdata/character', 'lwfdata/', '', 0.0f, 1.0f, 0, null as Camera, null as Camera, true, true,
null as System.Func[of LWF.Data, bool],
null as System.Action[of LWFObject],
null as System.Action[of LWFObject],