프로그래밍/유니티2020. 9. 7. 10:19

'프로그래밍 > 유니티' 카테고리의 다른 글

모뉴먼트벨리 구현  (0) 2020.04.07
패드 해상도 대응용 코드  (0) 2020.03.04
앱 실행될때 자동으로 호출  (0) 2020.01.13
Unirx 스트림 합성  (0) 2019.09.16
unirx invoke 같은 기능  (0) 2019.08.20
Posted by JinFluenza
프로그래밍/유니티2020. 4. 7. 21:14

'프로그래밍 > 유니티' 카테고리의 다른 글

스크린샷 + 쉐어링  (0) 2020.09.07
패드 해상도 대응용 코드  (0) 2020.03.04
앱 실행될때 자동으로 호출  (0) 2020.01.13
Unirx 스트림 합성  (0) 2019.09.16
unirx invoke 같은 기능  (0) 2019.08.20
Posted by JinFluenza
프로그래밍/유니티2020. 3. 4. 19:00

[RequireComponent(typeof(CanvasScaler))]
public class CanvasScalerSetter : MonoBehaviour
{
    private CanvasScaler scaler;

    private void Awake()
    {
        scaler = GetComponent();
        SetMatchSize();
    }

    private void SetMatchSize()
    {
        float referenceResolustion = scaler.referenceResolution.x / scaler.referenceResolution.y;

        float currentResolution = (float)Screen.width / (float)Screen.height;

        if (referenceResolustion >= currentResolution)
        {
            scaler.matchWidthOrHeight = 0;
        }
        else
        {
            scaler.matchWidthOrHeight = 1;
        }
    }
}

'프로그래밍 > 유니티' 카테고리의 다른 글

스크린샷 + 쉐어링  (0) 2020.09.07
모뉴먼트벨리 구현  (0) 2020.04.07
앱 실행될때 자동으로 호출  (0) 2020.01.13
Unirx 스트림 합성  (0) 2019.09.16
unirx invoke 같은 기능  (0) 2019.08.20
Posted by JinFluenza
프로그래밍/유니티2020. 1. 13. 14:32

        [RuntimeInitializeOnLoadMethod(RuntimeInitializeLoadType.AfterSceneLoad)]

'프로그래밍 > 유니티' 카테고리의 다른 글

모뉴먼트벨리 구현  (0) 2020.04.07
패드 해상도 대응용 코드  (0) 2020.03.04
Unirx 스트림 합성  (0) 2019.09.16
unirx invoke 같은 기능  (0) 2019.08.20
Jenzect projectContext 세팅  (0) 2019.08.14
Posted by JinFluenza
프로그래밍/기타2019. 10. 24. 01:59

Privacy Policy

Mayonnaisee built the Light Block app as an Ad Supported app. This SERVICE is provided by Mayonnaisee at no cost and is intended for use as is.

This page is used to inform visitors regarding my policies with the collection, use, and disclosure of Personal Information if anyone decided to use my Service.

If you choose to use my Service, then you agree to the collection and use of information in relation to this policy. The Personal Information that I collect is used for providing and improving the Service. I will not use or share your information with anyone except as described in this Privacy Policy.

The terms used in this Privacy Policy have the same meanings as in our Terms and Conditions, which is accessible at Light Block unless otherwise defined in this Privacy Policy.

Information Collection and Use

For a better experience, while using our Service, I may require you to provide us with certain personally identifiable information. The information that I request will be retained on your device and is not collected by me in any way.

The app does use third party services that may collect information used to identify you.

Link to privacy policy of third party service providers used by the app

Log Data

I want to inform you that whenever you use my Service, in a case of an error in the app I collect data and information (through third party products) on your phone called Log Data. This Log Data may include information such as your device Internet Protocol (“IP”) address, device name, operating system version, the configuration of the app when utilizing my Service, the time and date of your use of the Service, and other statistics.

Cookies

Cookies are files with a small amount of data that are commonly used as anonymous unique identifiers. These are sent to your browser from the websites that you visit and are stored on your device's internal memory.

This Service does not use these “cookies” explicitly. However, the app may use third party code and libraries that use “cookies” to collect information and improve their services. You have the option to either accept or refuse these cookies and know when a cookie is being sent to your device. If you choose to refuse our cookies, you may not be able to use some portions of this Service.

Service Providers

I may employ third-party companies and individuals due to the following reasons:

  • To facilitate our Service;
  • To provide the Service on our behalf;
  • To perform Service-related services; or
  • To assist us in analyzing how our Service is used.

I want to inform users of this Service that these third parties have access to your Personal Information. The reason is to perform the tasks assigned to them on our behalf. However, they are obligated not to disclose or use the information for any other purpose.

Security

I value your trust in providing us your Personal Information, thus we are striving to use commercially acceptable means of protecting it. But remember that no method of transmission over the internet, or method of electronic storage is 100% secure and reliable, and I cannot guarantee its absolute security.

Links to Other Sites

This Service may contain links to other sites. If you click on a third-party link, you will be directed to that site. Note that these external sites are not operated by me. Therefore, I strongly advise you to review the Privacy Policy of these websites. I have no control over and assume no responsibility for the content, privacy policies, or practices of any third-party sites or services.

Children’s Privacy

These Services do not address anyone under the age of 13. I do not knowingly collect personally identifiable information from children under 13. In the case I discover that a child under 13 has provided me with personal information, I immediately delete this from our servers. If you are a parent or guardian and you are aware that your child has provided us with personal information, please contact me so that I will be able to do necessary actions.

Changes to This Privacy Policy

I may update our Privacy Policy from time to time. Thus, you are advised to review this page periodically for any changes. I will notify you of any changes by posting the new Privacy Policy on this page. These changes are effective immediately after they are posted on this page.

Contact Us

If you have any questions or suggestions about my Privacy Policy, do not hesitate to contact me.

This privacy policy page was created at privacypolicytemplate.net and modified/generated by App Privacy Policy Generator

 

'프로그래밍 > 기타' 카테고리의 다른 글

ipv4 ipv6 차이점  (0) 2019.02.15
MVC 패턴  (0) 2018.12.17
vs 단축키  (0) 2018.12.14
unity svn ignore  (0) 2018.05.20
IOS cocoapods  (0) 2018.05.12
Posted by JinFluenza
프로그래밍/유니티2019. 9. 16. 10:23

'프로그래밍 > 유니티' 카테고리의 다른 글

패드 해상도 대응용 코드  (0) 2020.03.04
앱 실행될때 자동으로 호출  (0) 2020.01.13
unirx invoke 같은 기능  (0) 2019.08.20
Jenzect projectContext 세팅  (0) 2019.08.14
unity 2d spriterenderer sort  (0) 2019.08.13
Posted by JinFluenza
프로그래밍/유니티2019. 8. 20. 17:27
Posted by JinFluenza
프로그래밍/유니티2019. 8. 14. 01:53

Global Bindings Using Project Context

This all works great for each individual scene, but what if you have dependencies that you wish to persist permanently across all scenes? In Zenject you can do this by adding installers to a ProjectContext object.

To do this, first you need to create a prefab for the ProjectContext, and then you can add installers to it. You can do this most easily by selecting the menu item Edit -> Zenject -> Create Project Context. You should then see a new asset in the folder Assets/Resources called 'ProjectContext'. Alternatively, you can right click somewhere in Projects tab and select Create -> Zenject -> ProjectContext.

If you click on this it will appear nearly identically to the inspector for SceneContext. The easiest way to configure this prefab is to temporarily add it to your scene, add Installers to it, then click "Apply" to save it back to the prefab before deleting it from your scene. In addition to installers, you can also add your own custom MonoBehaviour classes to the ProjectContext object directly.

Then, when you start any scene that contains a SceneContext, your ProjectContext object will always be initialized first. All the installers you add here will be executed and the bindings that you add within them will be available for use in all scenes within your project. The ProjectContext game object is set as DontDestroyOnLoad so it will not be destroyed when changing scenes.

Note also that this only occurs once. If you load another scene from the first scene, your ProjectContext will not be called again and the bindings that it added previously will persist into the new scene. You can declare ITickable / IInitializable/ IDisposable objects in your project context installers in the same way you do for your scene installers with the result being that IInitializable.Initialize is called only once across each play session and IDisposable.Dispose is only called once the application is fully stopped.

The reason that all the bindings you add to a global installer are available for any classes within each individual scene, is because the Container in each scene uses the ProjectContext Container as it's "parent". For more information on nested containers see here.

ProjectContext is a very convenient place to put objects that you want to persist across scenes. However, the fact that it's completely global to every scene can lead to some unintended behaviour. For example, this means that even if you write a simple test scene that uses Zenject, it will load the ProjectContext, which may not be what you want. To address these problems it is often better to use Scene Parenting instead, since that approach allows you to be selective in terms of which scenes inherit the same common bindings. See here for more details on that approach.

Note also that by default, any game objects that are instantiated inside ProjectContext will be parented underneath it by default. If you'd prefer that each newly instantiated object is instead placed at the root of the scene hierarchy (but still marked DontDestroyOnLoad) then you can change this by unchecking the flag 'Parent New Objects Under Context' in the inspector of ProjectContext.

 

 

+ 반드시 씬에 scenecontext가 하나라도 있어야 인스턴스가 생성됨.

+바인딩 예시 (MonoInstaller)

        Container.Bind().FromComponentInNewPrefab(soundManager).AsSingle().NonLazy();  ->프리팹 클론 한개 생성함.

 

'프로그래밍 > 유니티' 카테고리의 다른 글

Unirx 스트림 합성  (0) 2019.09.16
unirx invoke 같은 기능  (0) 2019.08.20
unity 2d spriterenderer sort  (0) 2019.08.13
에디터에서 시작할때 게임뷰 스케일 최소값으로 고정  (0) 2019.07.31
inspector attribute  (0) 2019.06.10
Posted by JinFluenza
프로그래밍/유니티2019. 8. 13. 15:00

'프로그래밍 > 유니티' 카테고리의 다른 글

unirx invoke 같은 기능  (0) 2019.08.20
Jenzect projectContext 세팅  (0) 2019.08.14
에디터에서 시작할때 게임뷰 스케일 최소값으로 고정  (0) 2019.07.31
inspector attribute  (0) 2019.06.10
리플렉션  (0) 2019.05.20
Posted by JinFluenza
프로그래밍/유니티2019. 7. 31. 23:57

'프로그래밍 > 유니티' 카테고리의 다른 글

Jenzect projectContext 세팅  (0) 2019.08.14
unity 2d spriterenderer sort  (0) 2019.08.13
inspector attribute  (0) 2019.06.10
리플렉션  (0) 2019.05.20
무한스크롤  (0) 2019.05.17
Posted by JinFluenza