Skip to content

Instantly share code, notes, and snippets.

View inertiave's full-sized avatar
🌴
On vacation

관성 주도 개발 inertiave

🌴
On vacation
View GitHub Profile
using System.Collections;
using UnityEngine;
public class Shooter : MonoBehaviour {
public LayerMask layerMask;
public Camera mainCamera;
public Transform target;
public Rigidbody bullet;
@inertiave
inertiave / Bootstrap.cs
Created July 1, 2020 08:16
유니티 명령줄 인수(command line arguments) 사용을 위한 부트스트랩
using System;
using System.Runtime.InteropServices;
using System.Text;
using UnityEngine;
using UnityEngine.UI;
using Application = UnityEngine.Application;
public class Bootstrap : MonoBehaviour
{
public Text text;
using System;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Security;
using UnityEngine.Bindings;
using UnityEngine.Internal;
using UnityEngine.Scripting;
using UnityEngineInternal;
namespace UnityEngine
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(Renderer))]
public class MaterialHandler : MonoBehaviour
{
static readonly Dictionary<string, Material> materialMap = new Dictionary<string, Material>();
Renderer targetRenderer;
public string materialPath = "Materials/pic";
@inertiave
inertiave / EditMultiTerrain.cs
Last active February 23, 2020 12:21
여러개의 터레인을 한 번에 편집Edit multi terrains at once by script.
using UnityEngine;
using UnityEditor;
public class EditMultiTerrain
{
[MenuItem("Tools/Multi terrain edit")]
private static void SetDrawInstanced()
{
Terrain[] terrains = Selection.activeGameObject.GetComponentsInChildren<UnityEngine.Terrain>();
foreach (var terrain in terrains)
@inertiave
inertiave / EditPrefab.cs
Created February 23, 2020 11:51
스크립트로 네스티드 프리팹을 편집하는 방법 How to edit nested prefab by script after 2018.3
using UnityEngine;
using UnityEditor;
public class EditPrefab {
[MenuItem("Prefab/Edit Prefabs")]
private static void EditPrefabs() {
AssetDatabase.StartAssetEditing();
var prefabs = AssetDatabase.FindAssets("prefab t:Prefab", new string[] {"Assets/Prefabs"});
using UnityEngine;
using RichText;
public class RichTextDemo : MonoBehaviour
{
private const float Pi = 3.14f;
private const string Quote = "\"Hank, this is great.\"";
private void Start()
{
using System;
using System.Diagnostics;
using System.Text;
using UnityEngine;
using UnityEngine.UI;
public class BuildTest : MonoBehaviour {
public Text result;
using UnityEngine;
[DefaultExecutionOrder(ExecuteOrder.CONTENT_INITIALIZE)]
public class AtlasGenerator : MonoBehaviour
{
void Awake()
{
CreateAtlas();
Debug.Log("Atlas Generated!");
}
using System;
using UnityEngine;
[DefaultExecutionOrder(ExecuteOrder.LOGIN_INIT)]
public class LoginModule : MonoBehaviour
{
void Awake()
{
byte[] bytes = new byte[0];