Search Unity

How to change Game Intensity Settings during runtime in Unity?

Discussion in 'Editor & General Support' started by castana1962, Jan 14, 2021.

  1. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi Everyone,

    We are building Rehab Treatments by VR Games and I would need to make some similar to this (
    ) to change the game difficulty settings at runtime.

    In my case, I would need to do the same but that the therapist can change the intensity exercise to add more objects and fewer objects in the game according to the patient's needs

    For that reason, Could anybody advise me on how to build it?

    Sorry for my little English and hopefully you can understand me.

    Thanks for your time and help

    Regards

    Alejandro
     
    Last edited: Jan 14, 2021
  2. Kurt-Dekker

    Kurt-Dekker

    Joined:
    Mar 16, 2013
    Posts:
    38,689
    You will have to debug what is going on. Start from the actual button selection (user itention), then move through the parts necessary to cause the quality to change to figure out where it is not changing.

    To help gain more insight into your problem, I recommend liberally sprinkling Debug.Log() statements through your code to display information in realtime.

    Doing this should help you answer these types of questions:

    - is this code even running? which parts are running? how often does it run?
    - what are the values of the variables involved? Are they initialized?

    Knowing this information will help you reason about the behavior you are seeing.
     
    castana1962 likes this.
  3. castana1962

    castana1962

    Joined:
    Apr 10, 2013
    Posts:
    400
    Hi Kurt-Dekker
    Thanks for your advice
    Regards
    Alejandro