EventSystemChecker.cs(18,29): error CS0131
Please help me whenever i create a game and wat to see how it works? it always show an error =
Assets/Standard Assets/Utility/EventSystemChecker.cs(18,29): error CS0131: The left-hand side of an assignment must be a variable, a property or an indexer
Please send it to me after finishing the codes succesfully or just comment me how i can repair this error
Answer by Ben-Stoneman · Nov 25, 2015 at 04:31 PM
Here is the fix:
void Awake()
{
if (!FindObjectOfType<EventSystem>())
{
//instantiate (eventSystem);
GameObject obj = new GameObject("EventSystem");
obj.AddComponent<EventSystem>();
obj.AddComponent<StandaloneInputModule().forceModuleActive = true;
obj.AddComponent<TouchInputModule>();
}
}
Your answer
Follow this Question
Related Questions
Need help with code. Issue CS0131,Having troubles cs0131 2 Answers
Bunch of inquiries on MMO generals answer any that you know! 0 Answers
How do you get the leap motion to work with an older version of unity 0 Answers
My bolt isn't respawning in game Its driving me crazy i have been at it for 2 days !! 1 Answer
Unexpected 'Void' expecting 'class' 0 Answers