Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: You can use synclists directly #366

Merged
merged 2 commits into from
Sep 30, 2020
Merged

feat: You can use synclists directly #366

merged 2 commits into from
Sep 30, 2020

Conversation

paulpach
Copy link
Contributor

@paulpach paulpach commented Sep 29, 2020

you had to write a class that extended synclist to make the weaver happy.
Now the weaver does not need to generate code for synclists anymore,
so you can use synclists as <insert your deity> intended.

before

class MyBehavior: NetworkBehaviour {
    // nonsense to make the weaver happy
    class SyncListMyType : SyncList<MyType> {}

    public readonly SyncListMyType mylist = new SyncListMyType();
}

after

class MyBehavior: NetworkBehaviour {
    public readonly SyncList<MyType> mylist = new SyncList<MyType>();
}

BREAKING CHANGE: SyncList and other syncobjects no longer have override methods to serialize and deserialize data

you had to write a class that extended synclist to make the weaver happy:

```cs
class MyBehavior: NetworkBehaviour {
    // nonsense to make the weaver happy
    class SyncListMyType : SyncList<MyType> {}

    public readonly SyncListMyType mylist = new SyncListMyType();
}
```

Now the weaver does not need to generate code for synclists anymore,
so you can use synclists as <insert your deity> intended:

```cs
class MyBehavior: NetworkBehaviour {
    public readonly SyncList<MyType> mylist = new SyncList<MyType>();
}
```

BREAKING CHANGE: SyncList and other syncobjects no longer have override methods to serialize and deserialize data
@sonarcloud
Copy link

sonarcloud bot commented Sep 30, 2020

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities (and Security Hotspot 0 Security Hotspots to review)
Code Smell A 0 Code Smells

93.8% 93.8% Coverage
10.1% 10.1% Duplication

@paulpach paulpach changed the title feat: You can use synclists and friends directly feat: You can use synclists directly Sep 30, 2020
@paulpach paulpach merged commit ca18d11 into master Sep 30, 2020
@paulpach paulpach deleted the synclistnoweaver branch September 30, 2020 01:50
github-actions bot pushed a commit that referenced this pull request Sep 30, 2020
# [46.0.0](v45.0.1...v46.0.0) (2020-09-30)

### Bug Fixes

* potential NRE with weaver errors ([9e0c18c](9e0c18c))

### Features

* You can use synclists directly ([#366](#366)) ([ca18d11](ca18d11))

### BREAKING CHANGES

* SyncList and other syncobjects no longer have override methods to serialize and deserialize data
@github-actions
Copy link
Contributor

🎉 This PR is included in version 46.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant