Search Issue Tracker

Won't Fix

Votes

3

Found in

2017.1.0f3

Issue ID

929942

Regression

Yes

UNetWeaver fails to produce serialization with static self-reference in MessageBase script

Scripting

-

To reproduce:
Open project

Expected: there will be no errors in console
Actual: error is thrown: 'UNetWeaver error: GenerateSerialization for MyBuggyMessage [MyBuggyMessage MyBuggyMessage::whatCreatesTheBug]. [MessageBase] member cannot be self-referencing.'

Reproduced on: 2017.1.0f1, 2017.1.0f3, 2017.2.0a1-b2
Not reproducible on: 5.5.4p1, 5.6.2p3, 2017.1.0a2-b8

Regression introduced in 2017.1.0f1

  1. Resolution Note:

    Mass closure of UNET Bugs.
    As UNet is Deprecated we are moving to low maintenance mode, where critical issues can get fixes.
    Closing this bug as part of cleaning-up the Bug List.

    If you feel this bug is really a road-blocker, you can reopen the bug and we will work this one.

Comments (2)

  1. Arachin

    Feb 20, 2019 12:55

    Reproduced on 2017.3.0f3... perhaps I should update...

  2. emotitron

    Aug 15, 2017 04:29

    I second this. Following code worked fine in 5.5, throws the error above now in 2017.

    public class SimpleEmptyMsg : SimpleMsgBase
    {
    public static SimpleEmptyMsg reusable = new SimpleEmptyMsg();

    public static void Command(short msgtype, int channel = Channels.DefaultReliable)
    {
    //reusable.value = _value;
    SendCommand(msgtype, reusable);
    }

    public static void RPC(short msgtype, NetworkConnection conn = null, int channel = Channels.DefaultReliable)
    {
    SendRpc(msgtype, reusable, conn);
    }

    }

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.