Skip to content

Instantly share code, notes, and snippets.

using GooglePlayServices;
using UnityEditor;
using UnityEngine;
internal static class Example
{
[MenuItem( "Tools/Hoge" )]
private static void Hoge()
{
PlayServicesResolver.Resolve
using System.Collections.Generic;
using System.Text;
namespace Kogane
{
/// <summary>
/// 配列の拡張メソッド
/// </summary>
public static class ArrayExtensionMethods
{
using System.Collections.Generic;
using System.Linq;
namespace Kogane
{
/// <summary>
/// 配列の拡張メソッド
/// </summary>
public static class ArrayExtensionMethods
{
using System.Collections.Generic;
using System.Linq;
using UnityEngine;
[ExecuteAlways]
public class Example : MonoBehaviour
{
[SerializeField] private SpriteRenderer m_spriteRenderer;
[SerializeField] private LineRenderer[] m_lineRenderers;
// ReSharper disable PossibleLossOfFraction
using JetBrains.Annotations;
using UnityEngine;
namespace Kogane
{
/// <summary>
/// スプライトをグリッド上に分割して返すクラス
/// </summary>
using Unity.Collections;
using UnityEngine;
[ExecuteAlways]
public class Example : MonoBehaviour
{
[SerializeField] private LineRenderer m_lineRenderer;
[SerializeField] private PolygonCollider2D m_collider2D;
private void Update()
import os
import re
def remove(folder_path):
# 指定したフォルダ内のファイルをリストアップ
files = os.listdir(folder_path)
# 正規表現パターン
pattern = re.compile(r'Hoge', re.IGNORECASE) # 大文字小文字を区別しないで検索
using System;
using UnityEngine;
namespace Kogane
{
public static class ComponentExtensionMethods
{
public static GameObject FindByNameContains<T>
(
this T self,
using Unity.Collections;
using UnityEngine;
public class Example : MonoBehaviour
{
[SerializeField] private GameObject[] m_gameObjects;
private void Start()
{
var instanceIDs = new NativeArray<int>
using System.Collections.Generic;
using UnityEngine;
public static class Vector2ExtensionMethods
{
public static Vector2 FindNearest
(
this IReadOnlyCollection<Vector2> self,
in Vector2 target
)