Search Feedback

2
votes

Serialize generic monobehaviours

Scripting

-

-

I'm tired of making scripts as generic as possible so it can be reused, but then having to create container classes for each generic type so it can be serialized to the inspector. (another reason to not use monobehaviours). This defeats the purpose of having "one generic class that does it for all".

Why not make it so that when adding a generic class script as a component, you will have to choose which type to pass into the generic parameters. this way we don't have to create unnessasry container classes.

Your opinion counts

Help us make things better. Share your great idea for improving Unity or vote for other people’s.

Log in to post a new idea

Categories

All

(8365)

2D

(197)

Ads

(31)

AI & Navigation

(50)

Analytics

(80)

Animation

(275)

Asset Store

(189)

Assets

(474)

Audio

(145)

Cloud Build

(86)

Collaborate

(11)

Docs & Tutorials

(172)

Editor

(1936)

Everyplay

(13)

Game Performance Reporting

(10)

General

(751)

Graphics

(699)

GUI

(335)

Input

(138)

Licensing

(68)

Networking

(141)

Physics

(314)

Platforms

(394)

Profiling & Optimization

(63)

Runtime

(146)

Scripting

(942)

Terrain

(149)

WebGL

(126)