Skip to content

Releases: CyanLaser/CyanPlayerObjectPool

V1.1.2 - Update VPM dependencies

05 May 12:08
Compare
Choose a tag to compare

If you are using U# 0.x, download v1.0.0 release instead!
The .unitypackage version is no longer being distributed. Download v1.1.0 release instead!

Changes

  • VPM Dependencies for VRCSDK and UdonSharp now ignore minor and patch version.
  • See V1.1.1 changelog for previous VPM specific changes.

V1.1.1 - VPM Format

30 Apr 02:04
496e392
Compare
Choose a tag to compare

If you are using U# 0.x, download v1.0.0 release instead!
The .unitypackage version is no longer being distributed. Download v1.1.0 release instead!

Changes

  • Files and folders reorganized to match VPM format.
    • Add package in unity with link: https://github.com/CyanLaser/CyanPlayerObjectPool.git?path=/com.cyan.playerobjectpool
    • Download and unzip com.cyan.playerobjectpool.zip to add to VPM's user packages.
  • Assembly Definitions added.
  • Examples moved to use VPM samples. You must import them through the package manager.
  • Updated Examples to fix networking bug when pooled object receives synced data before the owner for that object has been assigned.
  • Readme now explains how to download samples through package manager.
  • Readme now includes a section on known potential issues when creating pooled object programs.

V1.1.0 - U# 1.0 fixes + features

30 Nov 20:21
21179c3
Compare
Choose a tag to compare

If you are using U# 0.x still, download v1.0.0 release instead!

If you are using U# 1.0 through VCC, download this version. Note that this version is exactly the same as v1.0.2 prerelease.

Fixes

  • All Inspectors now support U# 1.0 calls, fixing exceptions and unable to set pool size

Features

  • DisableUnassignedObjects
    • Option to prevent disabling pool objects when unassigned. Defaults to true, meaning unassigned objects will be enabled/disabled automatically. This can be used to get around the bug where disabling synced objects could cause bad data to be sent to players.
  • PoolObjectsParent
    • Option to provide what transform holds all pool objects as children. Defaults to itself. This can be used to get around initialization issues with VRChat's Execution Order.
  • CyanPlayerObjectPoolObject
    • Optional abstract class for Pool Object. This will make it clear which methods the user needs to implement for a pool object.
  • CyanPlayerObjectPoolListener
    • Optional abstract class for Pool Listener. This will make it clear which methods the user needs to implement for a pool object.

V1.0.2 - Options to help with odd bugs

08 Apr 19:46
Compare
Choose a tag to compare
Pre-release

Features

  • DisableUnassignedObjects
    • Option to prevent disabling pool objects when unassigned. Defaults to true, meaning unassigned objects will be enabled/disabled automatically. This can be used to get around the bug where disabling synced objects could cause bad data to be sent to players.
  • PoolObjectsParent
    • Option to provide what transform holds all pool objects as children. Defaults to itself. This can be used to get around initialization issues with VRChat's Execution Order.
  • CyanPlayerObjectPoolObject
    • Optional abstract class for Pool Object. This will make it clear which methods the user needs to implement for a pool object.
  • CyanPlayerObjectPoolListener
    • Optional abstract class for Pool Listener. This will make it clear which methods the user needs to implement for a pool object.

V1.0.1 - UdonSharp v1.0 quick fix

23 Mar 06:53
Compare
Choose a tag to compare
Pre-release

Quick fix to support UdonSharp 1.0's serialization changes. No new features added.

V1.0.0 - Release

20 Jan 16:06
Compare
Choose a tag to compare

Notes

No changes from v0.0.5, but no longer marked as pre-release!

Updating From v0.0.4 or below

Note: that this has breaking changes if you are updating from v0.0.4 or below
Due to the splitting of the prefab, some work will be needed to update old systems to this new version.

  1. Add the new "PlayerObjectAssigner" prefab into the scene
  2. Move all pooled objects as children of this new prefab
  3. Fix all references to the object pool in your Udon programs to use this new prefab instead
    1. (U# users) Change all references of type CyanPlayerObjectPool to CyanPlayerObjectAssigner to fix any compile errors
  4. (Optional) set the pool listener reference in the PlayerObjectAssigner, if it was assigned in the previous PlayerObjectPool

V0.0.5 - Split Player Index assignment from Player Object Assignment

09 Dec 16:46
Compare
Choose a tag to compare

Change Notes

Updated the Object Pool to now be two prefabs:

  • CyanPlayerObjectPool - Assigns and syncs indices to players.
  • CyanPlayerObjectAssigner - Given player index assignment, assigns objects to players. Multiple of these can exist in the scene.

This change allows prefab authors to make their own object pools using this system without conflicting with other prefabs using the pool and wasting network bandwidth. Prefab authors, please read the updated readme on how to structure your prefabs. Example prefabs coming soon.

Features

  • Multiple Object assigners can exist in the scene and use the same player index assignment without using more network bandwidth
  • Better user prefab support for distributing
  • Dragging an Object Assigner prefab into the scene will auto add the Object Pool system for you if one doesn't already exist in the scene.
  • Object Assigners can be used to notify Udon of player index assignments, without needing to assign an object.
  • Added new Inspectors to help with setting up the object pool
    • Easily change size of the object pool
    • See all Object Assigners in the scene
    • Set a prefab for an Object Assigner and auto spawn prefab instances.
  • Updated Pool listener methods
    • Removed OnAssignmentChanged event
    • OnPlayerAssigned and OnPlayerUnassigned no longer give player ID but do give the a valid VRCPlayerApi of that player as well as the index assigned to or unassigned from this player.

Bug Fixes

  • Added checks for if serialization failed and auto retry.
  • Fixed issue where serialization may never happen due to float comparison errors.
  • Delay assignments on Master until serialization has finished to reduce delay between master and remote clients.
  • Check network status before serializing, resulting in faster serialization overall in heavy networked worlds.
  • Fixed CyanTrigger example where playerAssignedPlayer variable was misspelled.

Breaking Changes

Note: that this has breaking changes if you are using previous versions
Due to the splitting of the prefab, some work will be needed to update old systems to this new version.

  1. Add the new "PlayerObjectAssigner" prefab into the scene
  2. Move all pooled objects as children of this new prefab
  3. Fix all references to the object pool in your Udon programs to use this new prefab instead
    1. (U# users) Change all references of type CyanPlayerObjectPool to CyanPlayerObjectAssigner to fix any compile errors
  4. (Optional) set the pool listener reference in the PlayerObjectAssigner, if it was assigned in the previous PlayerObjectPool

Screenshots

image image image

V0.0.4 Bug Fixes

10 Oct 11:59
Compare
Choose a tag to compare
V0.0.4 Bug Fixes Pre-release
Pre-release

Features

  • Added helper method to get a player's pool index value
  • OnPlayerAssigned and OnPlayerUnassigned now set a VRCPlayerApi variable since getting the player id of the player leaving returns null. (Examples updated to use this new variable)

Bug Fixes

  • Fixed bug causing players to be assigned multiple objects.
  • Fixed bug where initial master crashing caused no assignments for anyone.
  • Fixed bug causing Udon to crash when calling helper methods before Start.

v0.0.3 - More Methods and Bug Fixes

23 Sep 06:00
Compare
Choose a tag to compare
Pre-release

New Features

  • Created pool listener events for OnPlayerAssigned and OnPlayerUnassigned with variables setting the player id and pool object Udon.
  • Added methods to get an ordered list of players that have been assigned an object.
  • Added methods to get an ordered list of active Udon pool objects.

Bug fixes

  • Fixed bug causing OnPlayerLeft with player id -1
  • Fixed bug causing multiple instances of the object pool system conflicting.

Examples

  • Updated examples to include:
    • Get current players
    • OnPlayerAssigned event
    • OnPlayerUnassigned event
  • Created pool listener template.

v0.0.2 - Bug fixes and More Examples

16 Sep 18:27
Compare
Choose a tag to compare
Pre-release

Features and Bug fixes

  • Added option to prevent taking ownership of pool objects to match Phase's system
  • Added tooltips for public Pool properties
  • Added Execution order to ensure pool initialization runs after pool objects
  • Added behavior sync attribute to force the object pool to use Manual Sync.
  • Added helper methods for UdonGraph and CyanTrigger. (Previously only UdonSharp could use these)
  • Added delay to every Serialization Request to decrease network load when multiple people join at the same time. (Potentially fixing long delay between some users getting their pool object)
  • Added verification check on player join if pool assignment contained an invalid player. This fixes the issue where pool assignment data was sent faster than the player's join message was received, causing some players to never get a pool object on remote clients.
  • Added unclaimed object queue to make assigning pool objects on master constant time instead of O(n). Note that next frame still has O(n) check to assign the object to the player itself, which happens on all clients still.

Examples

  • Reorganized examples into their own folders so it is easier to find what type of examples or if you don't want to import them at all.
  • Added CyanTrigger examples.
  • Updated all examples to include a Pool Listener and show how to get and use the local player's pool object.

Known bugs