Skip to content

Instantly share code, notes, and snippets.

View nickyeh97's full-sized avatar

Nick Yeh nickyeh97

  • Taiwan
View GitHub Profile
// OnPreRender/OnPostRender will not call in SRP
void OnPostRender()
{
//Debug.LogFormat("frameTimer : {0} , frameInterval : {1}", frameTimer, frameInterval);
if (isREC && (frameTimer += Time.deltaTime) > frameInterval)
{
frameTimer -= frameInterval;
frameBuffer.ReadPixels(camRect, 0, 0);
Debug.Log("EncodeToJPG Now");
using UnityEngine;
using System.Collections;
namespace DesignPattern_Bridge
{
// 定義作類別之共用介面
public abstract class Implementor
{
public abstract void OperationImp();
}
using UnityEngine;
using System.Collections;
using DesignPattern_Bridge;
public class BridgeTest : MonoBehaviour {
void Start () {
UnitTest();
UnitTest_Window();
}
@nickyeh97
nickyeh97 / cloudSettings
Last active May 18, 2022 05:16
Vs code 雲端同步
{"lastUpload":"2021-03-29T07:33:13.890Z","extensionVersion":"v3.4.3"}
@nickyeh97
nickyeh97 / Dig_Progressing.cs
Created November 23, 2018 04:29
挖掘點的腳本 負責挖掘行為與進度
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
[RequireComponent(typeof(BoxCollider2D))]
public class Dig_Progressing : MonoBehaviour
{
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpawnRandow : Photon.MonoBehaviour
{
[SerializeField]
private GameObject[] TeamA;
[SerializeField]
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class PhotonManager : Photon.PunBehaviour
{
public static PhotonManager instance;
private void Awake()//載入場景
{
if (instance != null)
{
DestroyImmediate(gameObject);
return;
}
DontDestroyOnLoad(gameObject);
instance = this;
private void OnTrackingFound()
{
Renderer[] rendererComponents = GetComponentsInChildren<Renderer>(true);
Collider[] colliderComponents = GetComponentsInChildren<Collider>(true);
// Enable rendering:
foreach (Renderer component in rendererComponents)
{
component.enabled = true;
}
private void OnTrackingFound()
{
Renderer[] rendererComponents = GetComponentsInChildren<Renderer>(true);
Collider[] colliderComponents = GetComponentsInChildren<Collider>(true);
// Enable rendering:
foreach (Renderer component in rendererComponents)
{
component.enabled = true;
}