Skip to content

Instantly share code, notes, and snippets.

:octocat:

kyubuns kyubuns

:octocat:
Block or report user

Report or block kyubuns

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View AnimeTask.cs
https://github.com/kyubuns/AnimeTask
await UniTask.WhenAll(
// x
new UniTask(
async () =>
{
await Anime.Play(
Easing.Create<Linear>(
startPosition.x,
View マスターデータに型つける.cs
CompositeResolver.RegisterAndSetAsDefault(new IJsonFormatter[]
{
new IntValueFormatter<Gold>(x => new Gold(x)),
new IDFormatter<StageID>(x => new StageID(x)),
}, new[]
{
StandardResolver.Default,
});
// -----
View AssetBuilder.cs
using System;
using System.IO;
using UnityEditor;
using UnityEngine;
namespace AssetManager.Editor
{
public static class AssetBuilder
{
[MenuItem("Build/AssetBundles")]
View pointer.v
struct User {
id int
}
fn show_user_id(user *User) {
println(user.id)
}
fn main() {
user := User{id: 10}
View Hoge.cs
// HorizontalLayoutGroupのめっちゃシンプルで挙動が分かりやすくてスクリプトからサクッと入れれる版。
// SourceというGameObjectを、itemsの数だけ左から右に並べる。
var source = ui.Get<RectTransform>("Source");
var listView = new ListView(new LeftToRightLayouter(), source);
using (var editor = listView.Edit())
{
foreach(var item in items)
{
View ListView.cs
using System;
using System.Collections.Generic;
using System.Linq;
using Baum2;
using UnityEngine;
using Object = UnityEngine.Object;
namespace Baum2.Util
{
public class ListView
@kyubuns
kyubuns / pre-commit
Created Oct 25, 2018
gitのpre-commitでコミットしたらいけないコードを防ぐやつ
View pre-commit
if git commit -v --dry-run | grep 'no commit' > /dev/null 2>&1
then
echo "Trying to commit non-committable code."
exit 1
else
exit 0
fi
View gist:2b89838230cf41938f9fa13c7d0fe437
xcargs = ""
xcargs += " IDEBuildOperationMaxNumberOfConcurrentCompileTasks=16"
xcargs += " GCC_GENERATE_DEBUGGING_SYMBOLS=NO DEBUG_INFORMATION_FORMAT=dwarf"
xcargs += " ONLY_ACTIVE_ARCH=YES VALID_ARCHS=arm64"
xcargs += " CC=\"ccacheclang\" GCC_PRECOMPILE_PREFIX_HEADER=NO" if File.exist?("/usr/local/bin/ccacheclang")
View Button色変えるやつ.cs
public void LateUpdate()
{
if (CachedButton.IsInteractable() == ButtonInteractable) return;
ButtonInteractable = Cache.IsInteractable();
var color = ButtonInteractable ? Cache.colors.normalColor : Cache.colors.disabledColor;
foreach (var graphic in Cache.transform.GetComponentsInChildren<Graphic>())
{
graphic.color = color;
View AnimeTask.cs
using System;
using System.Threading.Tasks;
using AnimeTask;
using UnityEngine;
using Animator = AnimeTask.Animator;
public class Hoge : MonoBehaviour
{
public async void Start()
{
You can’t perform that action at this time.