Search Issue Tracker
Fixed in 5.1.0
Votes
0
Found in
5.0.0b21
Issue ID
669281
Regression
No
[Delegates] Crash when calling a delegate created on a generic function
Steps to reproduce:
1. Create a new Unity project
2. Create a new script
3. Copy this piece of code to the script:
using UnityEngine;
using System.Collections;
using System;
public class NewBehaviourScript : MonoBehaviour {
// Use this for initialization
void Start () {
var m = typeof(NewBehaviourScript).GetMethod("Foo");
// obviously, here should be a call to m.MakeGenericMethod()...
Action a = (Action)Delegate.CreateDelegate(typeof(Action),
this, m);
a();
}
public void Foo<T>() { }
}
4. Attach the script to a game object
5. Play the scene
6. Unity will crash
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- UI Source Image property gets set to 'None' when using a specific Sprite and Play mode is entered
- Rendering locks up when not looking at a transparent material on Meta Quest 2
- Volumetrics break when using a Custom Pass to create a Thickness Buffer for Alpha Clipping
- All tests are run instead of only the failed ones when the "Rerun Failed" button is pressed
- GameObject is not masked when the "Render PostProcessing Effects" pass executes with a resolved non-MSAA Color target and MSAA DepthStencil target
Add comment