OnCollisionEnter() not working in Unity3D

I have an object with a mesh collider and a prefab with sphere collider. I want the instance of the prefab to be destroyed if the two collide. I wrote the following in a script: But it is not working. I have tried toggling isTrigger on both the objects.

What is the purpose of nameof?

What about cases where you want to reuse the name of a property, for example when throwing exception based on a property name, or handling a PropertyChanged event. There are numerous cases where you would want to have the name of the property. Take this example: In the first case, renaming SomeProperty will cause a compilation error if you … Read more

ASP.NET 5 MVC: unable to connect to web server ‘IIS Express’

What I’m doing: Opening Visual Studio Community 2015 File -> New -> Project Under Visual C#: Web -> ASP.NET Web Application Web Application And press f5 for the popup error “unable to connect to web server ‘IIS Express’.“ Deleting applicationhost.config, located in Documents\IISExpress\config, doesn’t change the error message. (There’s also an IISExpress folder in program files and program files (x86).) Something I … Read more

C# Java HashMap equivalent

Dictionary is probably the closest. System.Collections.Generic.Dictionary implements the System.Collections.Generic.IDictionary interface (which is similar to Java’s Map interface). Some notable differences that you should be aware of: Adding/Getting items Java’s HashMap has the put and get methods for setting/getting items myMap.put(key, value) MyObject value = myMap.get(key) C#’s Dictionary uses [] indexing for setting/getting items myDictionary[key] = value MyObject value = myDictionary[key] null keys Java’s HashMap allows null keys .NET’s Dictionary throws an ArgumentNullException if you try … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)