Code Monkey home page Code Monkey logo

serializable-dictionary's Introduction

Serializable Dictionary

Language available: [한국어 (대한민국)] [English (US)]

유니티에서 바로 사용 가능한 직렬화 딕셔너리 입니다

설치 방법

유니티 버전 2022.3.0f1 이상으로 테스트했습니다
만약 특정 버전에서 오류가 발생한다면 얘기해주세요

  1. 패키지 관리자에서 git URL로 설치합니다
    • * Rumi's Serializable Dictionary : https://github.com/Rumi727/Serializable-Dictionary.git?path=Packages/com.rumi727.serializable.dictionary
  2. 끝!

사용 방법

public class Test : MonoBehaviour
{
  public SerializableDictionary<string, Color> colorDatas;
}

네. 이게 끝입니다!
평소 딕셔너리 선언하듯이 해주면 알아서 모든걸 다 해줍니다

또한, SerializableDictionary는 Dictionary를 상속하기 때문에 평소 딕셔너리 쓰듯이 쓰기만 하면 됩니다
즉, 기존에 쓰던 DictionarySerializableDictionary로 교채만 해도 완벽히 호환된다는거죠!
그렇기에 당연히 Json.NET 같은 패키지에서도 딕셔너리로 감지할 것입니다 (아마도요?)

추가로, 유니티 내부 직렬화 시스템을 사용한 것이기 때문에 스크립트 뿐만 아니라 ScriptableObject, JsonUtility 등 여러곳에서도 사용할 수 있습니다
또한 당연히 되돌리기, 다시실행 같은것도 지원합니다
프리팹 오버라이딩 또한 지원은 하나, 리스트를 2개로 키와 값을 분류하는 그 특성상 조오금 이상하긴 합니다 (리스트 하나로 합치고 싶었는데 그러면 너무 복잡해지더라구요)

인스펙터에서는 어떻게 보이나요?

image

serializable-dictionary's People

Contributors

rumi727 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.