This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using Unity.ProjectAuditor.Editor.Core; | |
using Unity.ProjectAuditor.Editor.Utils; | |
using UnityEngine; | |
using UnityEngine.Rendering; | |
namespace Unity.ProjectAuditor.Editor.Modules | |
{ | |
class ShaderAnalyzer : ShaderModuleAnalyzer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static Dictionary<string, Func<int, string>> ordinalSuffixes = new Dictionary<string, Func<int, string>>() | |
{ | |
// 英語 (特殊なルールを持つ) | |
{ "en", (number) => { | |
if (number % 100 >= 11 && number % 100 <= 13) | |
return $"{number}th"; | |
else | |
switch (number % 10) | |
{ | |
case 1: return $"{number}st"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Unity.exe \ | |
-batchmode \ | |
-logFile EditorLog.txt \ | |
-projectPath ProjectPath | |
process_id=$! | |
tail -f EditorLog.txt & | |
tail_pid=$! | |
wait $process_id | |
unity_status=$? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://discussions.unity.com/t/multiplayer-playmode-does-not-update-assembly-properly/922976 | |
using System; | |
using System.Reflection; | |
using UnityEditor; | |
using UnityEngine; | |
internal class ForceSyncVirtualPlayer : AssetPostprocessor | |
{ | |
private const string SessionStateKey = "ForceSyncVirtualPlayer.CachedTotalCount"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Threading; | |
using Cysharp.Threading.Tasks; | |
using JetBrains.Annotations; | |
using UnityEngine.AddressableAssets; | |
using UnityEngine.ResourceManagement.AsyncOperations; | |
namespace KyubunsSandbox | |
{ | |
public static class AddressableWrapper |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>ChatGPT Twitter-like Webpage</title> | |
<style> | |
body { | |
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol'; | |
background-color: #f5f8fa; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Diagnostics; | |
using System.Net.Http.Headers; | |
using System.Text; | |
using System.Text.Json; | |
using System.Text.Json.Nodes; | |
// https://platform.openai.com/docs/guides/chat | |
const string apiKey = "(APIKEY)"; | |
async Task<string> Send(HttpClient httpClient, IEnumerable<(string Role, string Content)> history) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
public class Sandbox : MonoBehaviour | |
{ | |
public void Start() | |
{ | |
普通はVector2も渡せちゃう(Vector3.one); | |
普通はVector2も渡せちゃう(Vector2.one); | |
絶対にVector3を渡してほしい(Vector3.one); | |
絶対にVector3を渡してほしい(Vector2.one); // ここはビルド通らない |
NewerOlder