ZeroFormatter icon indicating copy to clipboard operation
ZeroFormatter copied to clipboard

The example code for generating array hints doesn't work with zfc.exe

Open flamepygmy opened this issue 8 years ago • 2 comments

This:

using ZeroFormatter;

namespace ZfcHint
{
    [ZeroFormattable]
    public class TypeHint
    {
        // zfc analyzes UnityEngine.Vector3[] type and register it. 
        [Index(0)]
        public UnityEngine.Vector3[] Hint1;
    }
}

Produces:

Unhandled Exception: System.Exception: Public property's accessor must be virtual. TypeHint.Hint1.

Also tested with one of my own types (that is [ZeroFormattable] and has [Index(N)] + virtual) with the same result.

flamepygmy avatar Feb 09 '17 01:02 flamepygmy

sorry, this is bug of document. please try here.

using ZeroFormatter;

namespace ZfcHint
{
    [ZeroFormattable]
    public class TypeHint
    {
        // zfc analyzes UnityEngine.Vector3[] type and register it. 
        [Index(0)]
        public virtual UnityEngine.Vector3[] Hint1 { get; set; }
    }
}

neuecc avatar Feb 09 '17 04:02 neuecc

Thanks! This fixed it.

flamepygmy avatar Feb 09 '17 19:02 flamepygmy