“Adults used to obsess about things in a more steadfast manner, by having long-term interests known as hobbies,” she writes. We live, as Willa Paskin argued at Slate recently, in an age of pop-culture obsession. A refreshing - hell, even liberating - sense of relief that I was permitted, per my lack of interest, to take a break from the ceaseless stream of media that a culturally literate person is expected to keep up with in 2014. But mixed in with the cold detachment, I must confess, lurked another, unignorable emotion: relief - relief that I truly didn’t give a damn about this particular pop-culture phenomenon, and could safely skip it. I have never felt any affinity toward “Star Wars” - my attitude about the franchise could best be described as “which one’s the wookie again?” So I gazed at the trailer-dissecting tweets with a healthy mix of condescension and indifference. The new “Star Wars” trailer had dropped, and the entire Internet, predictably, couldn’t shut up about it.
Thanks to you too for the quick reply! It's always refreshing when people are happy to help even on a super old thread.Two weeks ago, I was lounging at my parents’ house in Massachusetts over Thanksgiving break, absentmindedly breaking a paper-thin resolution not to stare into my phone all the time, when most of my Twitter feed briefly stopped making absurdist jokes involving the word “bae” and started doing something far more alienating. I'd been using weird coroutines that waited a few seconds to see if it had been imported yet. I'm guessing the DisallowAutoRefresh also causes Refresh to be synchronous? I kept having issues with the texture not necessarily being available by the time that next line happens to load it back in. I've read that AssetDatabase.Refresh() is asynchronous. I've been using AssetDatabase.Refresh(AssetImportOptions.ForceUpdate / ForceSynchronousImport) to try and force the refresh but using DisallowAutoRefresh certainly makes more sense. And I didn't even know about AssetDatabase.GenerateUniqueAssetPath or Disallow/Allow AutoRefresh. I had been using EditorUtility.SetDirty on the texture, but no idea if the ordering was correct. Thank you ! This is exactly what I was looking for! This thread has been the only place I can find any reference to this issue and I don't know where else to turn! Any assistance is appreciated more than you could know! I am not proud enough to admit I have spent so many hours on this and just feel so dumb I've spent this much time and couldn't figure out what you'd think wouldn't be so hard. All I want to do is:ġ) Create a texture in edit mode and save as texture assetĢ) Reload the saved texture and assign it to a fieldģ) Have that field retain reference to newly created texture upon Unity reload
I have spent so much time trying to figure this out and I don't know where else to look. Would either of you mind just providing the most simple example of "The whole create texture -> serialize to disk -> import -> modify import settings to match original texture -> re-import -> load texture workflow"?
Which makes it all the more confusing when I re-open Unity later and the reference is gone. It 'appears' to work, the Icon field seems updating and clicking it even pings the texture asset. Then I'm 'attempting' to reload them and set them to a Texture2D field in a ScriptableObject.Ĭreating the texture asset works, but everything I've tried of reloading the texture back in doesn't.
In edit mode I'm creating dynamic textures by doing screen captures and then saving them as texture assets. Hey guys, please forgive me profusely for resurrecting this thread from a year ago, but I'm having the exact same issue you guys are describing.