antfarmar / Unity-3D-Asteroids

A simple Asteroids clone. In 3D.
The Unlicense
65 stars 15 forks source link

Hot-Reloading & Non-Serializable Types #7

Closed antfarmar closed 8 years ago

antfarmar commented 8 years ago

Minor Issue:

Possible Fixes:

  1. Don't hot-reload.
  2. Re-implement w/o using non-serializeable types. See SerializeField manual entry for types
  3. Destroy then recreate the pools:
    • Recompiling code in Unity calls OnDisable() and OnEnable() on all objects.
    • Do it there.
antfarmar commented 8 years ago

Created a new branch hot-reloadable.

antfarmar commented 8 years ago

_Note:_ It is better to take advantage of things like dictionaries, queues, static classes, object references, etc, rather than the minor advantages that hot-reloading provides (which is probably not sustainable as a project grows anyhow). One should prefer clean, efficient, readable code and architecture over most things that would sacrifice it.