Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Bug / Crash  warning CS00108
#1
"Assets\Obi\Scripts\Actors\ObiCloth.cs(78,14): warning CS0108: 'ObiCloth.Awake()' hides inherited member 'ObiClothBase.Awake()'. Use the new keyword if hiding was intended." is printed. Do I have to do something?
Reply
#2
(07-02-2019, 01:02 PM)Richard Wrote: "Assets\Obi\Scripts\Actors\ObiCloth.cs(78,14): warning CS0108: 'ObiCloth.Awake()' hides inherited member 'ObiClothBase.Awake()'. Use the new keyword if hiding was intended." is printed. Do I have to do something?

Oops! thanks for finding this Sonrisa

It will not affect behavior in any way so you can ignore it. However, fixing it is easy: go to ObiClothBase.cs and declare the Awake() method (line 130) as virtual:
Code:
public virtual void Awake()

Then, in ObiCloth.cs (line 78) declare it as override:
Code:
public override void Awake()
Reply