This file contains 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.Collections; | |
using UnityEngine; | |
public class Shooter : MonoBehaviour { | |
public LayerMask layerMask; | |
public Camera mainCamera; | |
public Transform target; | |
public Rigidbody bullet; |
This file contains 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.Runtime.InteropServices; | |
using System.Text; | |
using UnityEngine; | |
using UnityEngine.UI; | |
using Application = UnityEngine.Application; | |
public class Bootstrap : MonoBehaviour | |
{ | |
public Text text; |
This file contains 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.Runtime.CompilerServices; | |
using System.Runtime.InteropServices; | |
using System.Security; | |
using UnityEngine.Bindings; | |
using UnityEngine.Internal; | |
using UnityEngine.Scripting; | |
using UnityEngineInternal; | |
namespace UnityEngine |
This file contains 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.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"; |
This file contains 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; | |
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) |
This file contains 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; | |
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"}); |
This file contains 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; | |
using RichText; | |
public class RichTextDemo : MonoBehaviour | |
{ | |
private const float Pi = 3.14f; | |
private const string Quote = "\"Hank, this is great.\""; | |
private void Start() | |
{ |
This file contains 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.Diagnostics; | |
using System.Text; | |
using UnityEngine; | |
using UnityEngine.UI; | |
public class BuildTest : MonoBehaviour { | |
public Text result; | |
This file contains 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; | |
[DefaultExecutionOrder(ExecuteOrder.CONTENT_INITIALIZE)] | |
public class AtlasGenerator : MonoBehaviour | |
{ | |
void Awake() | |
{ | |
CreateAtlas(); | |
Debug.Log("Atlas Generated!"); | |
} |
This file contains 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 UnityEngine; | |
[DefaultExecutionOrder(ExecuteOrder.LOGIN_INIT)] | |
public class LoginModule : MonoBehaviour | |
{ | |
void Awake() | |
{ | |
byte[] bytes = new byte[0]; | |
NewerOlder