Search Unity

  1. Unity Asset Manager is now available in public beta. Try it out now and join the conversation here in the forums.
    Dismiss Notice

Possible bug with 2017.1.0b8 Autoproperty Initialization

Discussion in '2017.1 Beta' started by adioevan1, Jun 4, 2017.

  1. adioevan1

    adioevan1

    Joined:
    Jul 30, 2014
    Posts:
    3
    Hello, going through the guide for reporting a bug I am going to post an issue I am seeing with autoproperty initialization.

    Specifically this example:
    Code (CSharp):
    1. public bool IsDead { get; private set; } = false;
    returns the error:
    Making an autoproperty works without an initial value works fine from what I see.

    The bug report form does not seem to have a specific classification for this type of bug, but I will try my best.

    For now I will just set the autoproperty in the constructor.
     
  2. adioevan1

    adioevan1

    Joined:
    Jul 30, 2014
    Posts:
    3
    Real issue was the beta was not targeting the right .net version. It can be changed in the Player Settings