• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges

Generics

Cancel

Cancel

All Questions

  • Unanswered Questions
avatar image

galactichyperstar commented

Generic Pooler not saving serialized fields on build?

Dec 31, '20 build·pooling·serialize·generics·builds

1 Reply

0 Votes

avatar image

sacredgeometry commented

Trying to create a generic functions for instantiations

Dec 31, '20 instantiate·generics

1 Reply

0 Votes

avatar image

AnOrdinarySandwich answered

How do I give an object a script component of a type specified by the calling source?

Dec 24, '20 in Help Room

1 Reply

0 Votes

avatar image

atulvi answered

Why is this generic "Get component if null" code not working

Dec 16, '20 getcomponent·component·null·generics

5 Replies

3 Votes

avatar image

SmallLion commented

How to create a generic monobehavior referencer

Dec 7, '20 inspector·generics

1 Reply

0 Votes

avatar image

elrohirgt edited

GetComponent returns null when using a generics class for T

Dec 6, '20 2d game·nullreferenceexception·getcomponent·generics

1 Reply

0 Votes

avatar image

stephen_gregory commented

MonoBehaviour.OnDestroy() how it works/ how to use it? Closed

Nov 26, '20 singleton·generics·ondestroy

1 Reply

0 Votes

avatar image

Bunny83 answered

How do I reference a generic BaseClass using GetComponentInParent()

Oct 6, '20 getcomponent·inheritance·generics

2 Replies

0 Votes

avatar image

LW edited

Is the class derived/inherited from generic list serializable?

Sep 15, '20 serialization·inheritance·generics·generic list·derived-class

1 Reply

0 Votes

avatar image

andrew-lukasik edited

PrefabHell - How to have scripts of prefabs instances reference the variables of the prefab instance they're attached to? Closed

Sep 12, '20 c#·prefab·array·list·generics

1 Reply

0 Votes

avatar image

gigos22 published

All items of any type collection are getting overwritten.

Sep 3, '20 generics·binary·collections

0 Replies

0 Votes

avatar image

Ran-Quan commented

Generic virtual methods on IL2CPP: how it works?

Aug 10, '20 il2cpp·generics·aot·scripting-underthehood·virtual functions

1 Reply

1 Votes

avatar image

Noxury commented

enum in generic subclass shows as integer

Jul 26, '20 enum·dropdown·integer·generics·abstract

1 Reply

0 Votes

avatar image

lucariolu3d commented

HasComponent

Jun 4, '20 c#·unity 5·getcomponent·type·generics

4 Replies

1 Votes

avatar image

Yasoz commented

(SOLUTION) How to serialize interfaces, generics, auto-properties and abstract System.Object classes?

May 2, '20 serialization·interface·properties·generics·framework

3 Replies

26 Votes

avatar image

MrDizzle26 commented

Polymorphism with generic ScriptableObjects?

Feb 19, '20 c#·scriptableobject·scriptable object·generics·polymorphism

1 Reply

0 Votes

avatar image

Boltman commented

Property draw a class that has a generic type

Feb 13, '20 classes·custom editor·generics·property drawer

3 Replies

0 Votes

avatar image

DaniilGalahow commented

GameObject as a constraint for generic class

Sep 8, '19 c#·gameobject·generics·where

1 Reply

0 Votes

avatar image

Smehi asked

Finding property with serializedObject on script with a generic

May 30, '19 serialization·custom editor·serializedproperty·generics·serializedobject

0 Replies

0 Votes

avatar image

Bunny83 commented

Constrain Generic to Specific Classes

May 25, '19 generics

3 Replies

1 Votes

avatar image

Bunny83 commented

How to cast without using a helper function

May 12, '19 generics·casting

1 Reply

0 Votes

avatar image

Ironstone edited

How to create a List containing all the different variables within a script (regardless of type)?

Apr 20, '19 c#·list·component·lists·generics

1 Reply

1 Votes

avatar image

Gongulus edited

Generic CustomEditor

Mar 26, '19 inheritance·custom editor·custom-inspector·generics·custom-editor

0 Replies

0 Votes

avatar image

sisi0616 edited

Can I preview a generic type animation file in a custom editor tool?

Jan 18, '19 animator·generics·customeditor

0 Replies

0 Votes

avatar image

MrDude answered

Why can't I use a variable of the same type as a static generic variable when using foreach?

Dec 11, '18 scripting problem·generics

2 Replies

0 Votes

avatar image

Marks4 commented

How can use OnPointerClick in a generic way?

Dec 10, '18 eventsystem·generics·reuse·clicked

1 Reply

0 Votes

avatar image

VideoJames edited

generic event system with scriptable objects

Nov 20, '18 editor-scripting·scriptableobject·eventsystem·generics

0 Replies

3 Votes

avatar image

alex_dossamer edited

Why does ScriptableObject.CreateInstance, where T is definite at runtime, return null?

Nov 15, '18 nullreferenceexception·scriptableobject·null·generics

1 Reply

0 Votes

avatar image

wdhunt16 commented

Generic field in subclass with type parameter of subclass

Sep 12, '18 scriptingbasics·generics

1 Reply

1 Votes

avatar image

JVene edited

Is it possible to have a class's variable correspond to either a BoxCollider2D or CapsuleCollider2D in order to reuse the class for objects with either type of collider?

Aug 29, '18 collider2d·boxcollider2d·generics·capsulecollider

1 Reply

0 Votes

  • 1
  • 2
  • 3
  • 4
  • 5
  • ›
  • »

Welcome to Unity Answers

The best place to ask and answer questions about development with Unity.

To help users navigate the site we have posted a site navigation guide.

If you are a new user to Unity Answers, check out our FAQ for more information.

Make sure to check out our Knowledge Base for commonly asked Unity questions.

If you are a moderator, see our Moderator Guidelines page.

We are making improvements to UA, see the list of changes.



Related Topics

c# list array getcomponent inheritance serialization component scriptableobject monobehaviour javascript singleton inspector scripting problem dictionary aot editor-scripting custom editor editor nullreferenceexception abstract classes custom-inspector prefab generic unity 5
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges