Giter Club home page Giter Club logo

getable's Introduction

Getable

싱글턴 대신 사용할 수 있는

고유하게 존재하는 타입을 가져오기 위한 디자인 패턴입니다.

UI에서 유용하게 사용할 수 있습니다.

예제

public class PlayerUI : Getable
{
    //스크립트
}

Getable을 상속하면

public class OtherUI : MonoBehaviour
{
    void Start
    {
        PlayerUI playerUI = Getable.Get<PlayerUI>();
    }
}

다음과 같이 다른 스크립트에서 Getable.Get<타입>() 함수로 가져올 수 있습니다.

Awake에서 추가하고, OnDestroy에서 제거되므로

Get해오기 전에 게임오브젝트가 한번은 켜져있어야 합니다.

getable's People

Contributors

solutena avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.