Self Explanitory....I need to fake some cookies...since my player isn't running on the web, but in the debugger...
stringa
Self Explanitory....I need to fake some cookies...since my player isn't running on the web, but in the debugger...
stringa
Cookies? Are you referring to PlayerPrefs, or do you have another way of storing data? If you are using PlayerPrefs, they should work regardless of being on web or not.
In case you have a data access layer in your project, you can probably fake the cookies if there is a common interface, say ICookie.
class FakeCookie : ICookie
{
// getters return fake data from local file or elsewhere
}
as opposed to
class Cookie : ICookie
{
// getters return actual data
}
and then you can request the correct cookie such that
ICookie cookie = CookieFactory.CreateCookie();
health = cookie.Get("health");
which would do a check something like this
public static ICookie CreateCookie()
{
if (Application.isWebPlayer)
return new Cookie();
else
return new FakeCookie();
}